[Skip to main content](#vessel-content)

#   Bottle deposit and base price information

##

- **[Rusty](/forum/user/83085-rusty "View Rusty's Profile")**
- [![Rusty's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/83085-rusty "View Rusty's Profile") Topic Author
- [ Offline](/forum/user/83085-rusty)

Less More

- Posts: 105
- Thank you received: 8
-

1 year 8 months ago [\#365624](#365624) by [Rusty](/forum/user/83085-rusty "View Rusty's Profile")  *[Bottle deposit and base price information](/forum/2-general-talk-about-hikashop/909128-bottle-deposit-and-base-price-information#365624 "Hi!  We're looking for an e-commerce solution based on Joomla. Since HikaShop is well know in the last years, I would give it a try. But there are two things I'm not sure about.  #1 Bottle deposit  I want to create an online shop for a &quot;Drinks Market&quot;. This market is based in Germany. Here you have to handle with &quot;bottle deposit&quot;. This is an additional price per product, that have to be displayed on the product listings, product details page, shopping cart, order mail and invoice.  As far as I know, HikaShop does not offer such an extension.  But maybe it can be realized with HikaShop. Would it be possible to use custom fields (for products) for deposit values? These deposit values have to be displayed &#95;and&#95; calculated as SUMMARIZED deposit value in the shopping cart (and order mail, invoice).  One example: Let's say, we have two products in the shopping cart...  product price 1 = 10,00 € deposit price 1 = 3,00 € product price 2 = 5,00 € deposit price 2 = 1,00 €  The shopping cart shows the product prices (single and summarized, as per default) and adds another line &quot;deposit&quot;, that shows the sum of all deposit prices (in the example: 4,00 €). So the final result is the summarized price of 19,00 €.  #2 Base price information  Here in germany exists a regulation for price information (&quot;Preisangabenverordnung&quot; -&gt; &quot;Price Indication Ordinance&quot; or &quot;base price&quot;). It means, that if we sell packages or goods by weight/volume/quantitiy/bulk we have to display the base price per unit.  One example: A product - let's say a water bottle - contains 0,5 l. The price is 0,90 €. On the product listing page and the product details page the following has to be displayed:  Price: 0,90 € (as usually) Content: 0,5 Litre (1,80 € / 1 Litre)  Now I try to describe the need..  For the configuration (in the backend) I would need two fields:  &#91;UNIT&#95;VALUE&#93; - in my example &quot;0,5&quot; &#91;UNIT&#95;BASE&#95;VALUE&#93; - in my example &quot;1&quot;  Now we need a little calculation for the base price per unit: &#91;BASE&#95;PRICE&#93; = &#91;ARTICLE&#95;PRICE&#93; / &#91;UNIT&#95;VALUE&#93; Now we need to display the result in the frontend - on following pages: ARTICLE&#95;LISTINGS and ARTICLE&#95;DETAIL&#95;PAGE - like this:  Content: &#91;UNIT&#95;VALUE&#93; &#91;UNIT&#93; (&#91;BASE&#95;PRICE&#93; € / &#91;UNIT&#95;BASE&#95;VALUE&#93; &#91;UNIT&#93;) ... and now with values: Content: 0.5 Litre (1,80 € &#42; / 1 Liter)  In the frontend: This information has to be displayed directly near the price information (in the html code: mainly directly after the price - with it's own css class for styling).  What do you think? Can HikaShop achive these jobs? ;)  Cheers Rusty")* was created by *[Rusty](/forum/user/83085-rusty "View Rusty's Profile")*

Hi!

We're looking for an e-commerce solution based on Joomla. Since HikaShop is well know in the last years, I would give it a try. But there are two things I'm not sure about.

\#1 Bottle deposit

I want to create an online shop for a "Drinks Market". This market is based in Germany. Here you have to handle with "bottle deposit". This is an additional price per product, that have to be displayed on the product listings, product details page, shopping cart, order mail and invoice.

As far as I know, HikaShop does not offer such an extension.

But maybe it can be realized with HikaShop. Would it be possible to use custom fields (for products) for deposit values? These deposit values have to be displayed _and_ calculated as SUMMARIZED deposit value in the shopping cart (and order mail, invoice).

One example:
Let's say, we have two products in the shopping cart...

product price 1 = 10,00 €
deposit price 1 = 3,00 €
product price 2 = 5,00 €
deposit price 2 = 1,00 €

The shopping cart shows the product prices (single and summarized, as per default) and adds another line "deposit", that shows the sum of all deposit prices (in the example: 4,00 €). So the final result is the summarized price of 19,00 €.

\#2 Base price information

Here in germany exists a regulation for price information ("Preisangabenverordnung" -&gt; "Price Indication Ordinance" or "base price").
It means, that if we sell packages or goods by weight/volume/quantitiy/bulk we have to display the base price per unit.

One example:
A product - let's say a water bottle - contains 0,5 l. The price is 0,90 €. On the product listing page and the product details page the following has to be displayed:

Price: 0,90 € (as usually)
Content: 0,5 Litre (1,80 € / 1 Litre)

Now I try to describe the need..

For the configuration (in the backend) I would need two fields:

[UNIT_VALUE] - in my example "0,5"
[UNIT_BASE_VALUE] - in my example "1"

Now we need a little calculation for the base price per unit: [BASE_PRICE] = [ARTICLE_PRICE] / [UNIT_VALUE]
Now we need to display the result in the frontend - on following pages: ARTICLE_LISTINGS and ARTICLE_DETAIL_PAGE - like this:

Content: [UNIT_VALUE] [UNIT] ([BASE_PRICE] € / [UNIT_BASE_VALUE] [UNIT])
... and now with values:
Content: 0.5 Litre (1,80 € * / 1 Liter)

In the frontend: This information has to be displayed directly near the price information (in the html code: mainly directly after the price - with it's own css class for styling).

What do you think? Can HikaShop achive these jobs? ![;)](/media/kunena/emoticons/24.png ";)")

Cheers
Rusty

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzkwOTEyOC1ib3R0bGUtZGVwb3NpdC1hbmQtYmFzZS1wcmljZS1pbmZvcm1hdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14278
-
-

1 year 8 months ago [\#365625](#365625) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Bottle deposit and base price information](/forum/2-general-talk-about-hikashop/909128-bottle-deposit-and-base-price-information#365625 "Hi!  We're looking for an e-commerce solution based on Joomla. Since HikaShop is well know in the last years, I would give it a try. But there are two things I'm not sure about.  #1 Bottle deposit  I want to create an online shop for a &quot;Drinks Market&quot;. This market is based in Germany. Here you have to handle with &quot;bottle deposit&quot;. This is an additional price per product, that have to be displayed on the product listings, product details page, shopping cart, order mail and invoice.  As far as I know, HikaShop does not offer such an extension.  But maybe it can be realized with HikaShop. Would it be possible to use custom fields (for products) for deposit values? These deposit values have to be displayed &#95;and&#95; calculated as SUMMARIZED deposit value in the shopping cart (and order mail, invoice).  One example: Let's say, we have two products in the shopping cart...  product price 1 = 10,00 € deposit price 1 = 3,00 € product price 2 = 5,00 € deposit price 2 = 1,00 €  The shopping cart shows the product prices (single and summarized, as per default) and adds another line &quot;deposit&quot;, that shows the sum of all deposit prices (in the example: 4,00 €). So the final result is the summarized price of 19,00 €.  #2 Base price information  Here in germany exists a regulation for price information (&quot;Preisangabenverordnung&quot; -&gt; &quot;Price Indication Ordinance&quot; or &quot;base price&quot;). It means, that if we sell packages or goods by weight/volume/quantitiy/bulk we have to display the base price per unit.  One example: A product - let's say a water bottle - contains 0,5 l. The price is 0,90 €. On the product listing page and the product details page the following has to be displayed:  Price: 0,90 € (as usually) Content: 0,5 Litre (1,80 € / 1 Litre)  Now I try to describe the need..  For the configuration (in the backend) I would need two fields:  &#91;UNIT&#95;VALUE&#93; - in my example &quot;0,5&quot; &#91;UNIT&#95;BASE&#95;VALUE&#93; - in my example &quot;1&quot;  Now we need a little calculation for the base price per unit: &#91;BASE&#95;PRICE&#93; = &#91;ARTICLE&#95;PRICE&#93; / &#91;UNIT&#95;VALUE&#93; Now we need to display the result in the frontend - on following pages: ARTICLE&#95;LISTINGS and ARTICLE&#95;DETAIL&#95;PAGE - like this:  Content: &#91;UNIT&#95;VALUE&#93; &#91;UNIT&#93; (&#91;BASE&#95;PRICE&#93; € / &#91;UNIT&#95;BASE&#95;VALUE&#93; &#91;UNIT&#93;) ... and now with values: Content: 0.5 Litre (1,80 € &#42; / 1 Liter)  In the frontend: This information has to be displayed directly near the price information (in the html code: mainly directly after the price - with it's own css class for styling).  What do you think? Can HikaShop achive these jobs? ;)  Cheers Rusty")*

Hi,

1.
You can do that with a custom product field ( [ www.hikashop.com/support/documentation/4...shop-field-form.html](https://www.hikashop.com/support/documentation/42-hikashop-field-form.html) ) and the cart fee plugin ( [ www.hikashop.com/marketplace/product/279-cart-fee.html](https://www.hikashop.com/marketplace/product/279-cart-fee.html) ).
With the custom field, you can fill in a fee in each product, and have it displayed on the listing / product page with the display settings of the custom field.
And with the cart fee plugin, you can have a formula to automatically calculate the sum of the fee of each product in the cart and add it as an extra line between the subtotal and the total.
So no need for a specific extension to do that since you can easily set this up with these more general features / plugin.

2. The HikaShop configuration has a setting "Display the cost per weight unit":
[ www.hikashop.com/support/documentation/5...html#display\_product](https://www.hikashop.com/support/documentation/54-hikashop-config.html#display_product)
If you activate it, the system will automatically display the cost per weight unit. For example, with it, you can configure a price of 12€ and a weight of 2KG. Then, HikaShop will automatically display "6€ per KG" on the product details page after the price with an extra span HTML element with the class hikashop_product_price_per_weight_unit
This is done in the view file product / listing_price which you can edit via the menu Display&gt;Views if you need to extend it to support listings, use custom product fields instead of the weight / weight unit, etc.
It should be relatively easy, even if you have no PHP knowledge.
For example, if you want to use a custom product field instead of the weight of the product, you can just change the several instances of "product_weight" in that view file to use the column name of your custom field.
And if you want to add it to the listings too, you can just change the line: Code:

if(!empty($this-&gt;element-&gt;product_id) &amp;&amp; isset($this-&gt;row-&gt;product_weight) &amp;&amp; bccomp(sprintf('%F',$this-&gt;row-&gt;product_weight), 0, 3)) {

to: Code:

if(isset($this-&gt;row-&gt;product_weight) &amp;&amp; bccomp(sprintf('%F',$this-&gt;row-&gt;product_weight), 0, 3)) {

The following user(s) said Thank You: [Rusty](/forum/user/83085-rusty "View Rusty's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzkwOTEyOC1ib3R0bGUtZGVwb3NpdC1hbmQtYmFzZS1wcmljZS1pbmZvcm1hdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Rusty](/forum/user/83085-rusty "View Rusty's Profile")**
- [![Rusty's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/83085-rusty "View Rusty's Profile") Topic Author
- [ Offline](/forum/user/83085-rusty)

Less More

- Posts: 105
- Thank you received: 8
-

1 year 8 months ago [\#365628](#365628) by [Rusty](/forum/user/83085-rusty "View Rusty's Profile")  Replied by *[Rusty](/forum/user/83085-rusty "View Rusty's Profile")* on topic *[Bottle deposit and base price information](/forum/2-general-talk-about-hikashop/909128-bottle-deposit-and-base-price-information#365628 "Hi!  We're looking for an e-commerce solution based on Joomla. Since HikaShop is well know in the last years, I would give it a try. But there are two things I'm not sure about.  #1 Bottle deposit  I want to create an online shop for a &quot;Drinks Market&quot;. This market is based in Germany. Here you have to handle with &quot;bottle deposit&quot;. This is an additional price per product, that have to be displayed on the product listings, product details page, shopping cart, order mail and invoice.  As far as I know, HikaShop does not offer such an extension.  But maybe it can be realized with HikaShop. Would it be possible to use custom fields (for products) for deposit values? These deposit values have to be displayed &#95;and&#95; calculated as SUMMARIZED deposit value in the shopping cart (and order mail, invoice).  One example: Let's say, we have two products in the shopping cart...  product price 1 = 10,00 € deposit price 1 = 3,00 € product price 2 = 5,00 € deposit price 2 = 1,00 €  The shopping cart shows the product prices (single and summarized, as per default) and adds another line &quot;deposit&quot;, that shows the sum of all deposit prices (in the example: 4,00 €). So the final result is the summarized price of 19,00 €.  #2 Base price information  Here in germany exists a regulation for price information (&quot;Preisangabenverordnung&quot; -&gt; &quot;Price Indication Ordinance&quot; or &quot;base price&quot;). It means, that if we sell packages or goods by weight/volume/quantitiy/bulk we have to display the base price per unit.  One example: A product - let's say a water bottle - contains 0,5 l. The price is 0,90 €. On the product listing page and the product details page the following has to be displayed:  Price: 0,90 € (as usually) Content: 0,5 Litre (1,80 € / 1 Litre)  Now I try to describe the need..  For the configuration (in the backend) I would need two fields:  &#91;UNIT&#95;VALUE&#93; - in my example &quot;0,5&quot; &#91;UNIT&#95;BASE&#95;VALUE&#93; - in my example &quot;1&quot;  Now we need a little calculation for the base price per unit: &#91;BASE&#95;PRICE&#93; = &#91;ARTICLE&#95;PRICE&#93; / &#91;UNIT&#95;VALUE&#93; Now we need to display the result in the frontend - on following pages: ARTICLE&#95;LISTINGS and ARTICLE&#95;DETAIL&#95;PAGE - like this:  Content: &#91;UNIT&#95;VALUE&#93; &#91;UNIT&#93; (&#91;BASE&#95;PRICE&#93; € / &#91;UNIT&#95;BASE&#95;VALUE&#93; &#91;UNIT&#93;) ... and now with values: Content: 0.5 Litre (1,80 € &#42; / 1 Liter)  In the frontend: This information has to be displayed directly near the price information (in the html code: mainly directly after the price - with it's own css class for styling).  What do you think? Can HikaShop achive these jobs? ;)  Cheers Rusty")*

@nicolas Thank you for your fast reply! I will check it out!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzkwOTEyOC1ib3R0bGUtZGVwb3NpdC1hbmQtYmFzZS1wcmljZS1pbmZvcm1hdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Rusty](/forum/user/83085-rusty "View Rusty's Profile")**
- [![Rusty's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/83085-rusty "View Rusty's Profile") Topic Author
- [ Offline](/forum/user/83085-rusty)

Less More

- Posts: 105
- Thank you received: 8
-

1 year 6 months ago [\#366649](#366649) by [Rusty](/forum/user/83085-rusty "View Rusty's Profile")  Replied by *[Rusty](/forum/user/83085-rusty "View Rusty's Profile")* on topic *[Bottle deposit and base price information](/forum/2-general-talk-about-hikashop/909128-bottle-deposit-and-base-price-information#366649 "Hi!  We're looking for an e-commerce solution based on Joomla. Since HikaShop is well know in the last years, I would give it a try. But there are two things I'm not sure about.  #1 Bottle deposit  I want to create an online shop for a &quot;Drinks Market&quot;. This market is based in Germany. Here you have to handle with &quot;bottle deposit&quot;. This is an additional price per product, that have to be displayed on the product listings, product details page, shopping cart, order mail and invoice.  As far as I know, HikaShop does not offer such an extension.  But maybe it can be realized with HikaShop. Would it be possible to use custom fields (for products) for deposit values? These deposit values have to be displayed &#95;and&#95; calculated as SUMMARIZED deposit value in the shopping cart (and order mail, invoice).  One example: Let's say, we have two products in the shopping cart...  product price 1 = 10,00 € deposit price 1 = 3,00 € product price 2 = 5,00 € deposit price 2 = 1,00 €  The shopping cart shows the product prices (single and summarized, as per default) and adds another line &quot;deposit&quot;, that shows the sum of all deposit prices (in the example: 4,00 €). So the final result is the summarized price of 19,00 €.  #2 Base price information  Here in germany exists a regulation for price information (&quot;Preisangabenverordnung&quot; -&gt; &quot;Price Indication Ordinance&quot; or &quot;base price&quot;). It means, that if we sell packages or goods by weight/volume/quantitiy/bulk we have to display the base price per unit.  One example: A product - let's say a water bottle - contains 0,5 l. The price is 0,90 €. On the product listing page and the product details page the following has to be displayed:  Price: 0,90 € (as usually) Content: 0,5 Litre (1,80 € / 1 Litre)  Now I try to describe the need..  For the configuration (in the backend) I would need two fields:  &#91;UNIT&#95;VALUE&#93; - in my example &quot;0,5&quot; &#91;UNIT&#95;BASE&#95;VALUE&#93; - in my example &quot;1&quot;  Now we need a little calculation for the base price per unit: &#91;BASE&#95;PRICE&#93; = &#91;ARTICLE&#95;PRICE&#93; / &#91;UNIT&#95;VALUE&#93; Now we need to display the result in the frontend - on following pages: ARTICLE&#95;LISTINGS and ARTICLE&#95;DETAIL&#95;PAGE - like this:  Content: &#91;UNIT&#95;VALUE&#93; &#91;UNIT&#93; (&#91;BASE&#95;PRICE&#93; € / &#91;UNIT&#95;BASE&#95;VALUE&#93; &#91;UNIT&#93;) ... and now with values: Content: 0.5 Litre (1,80 € &#42; / 1 Liter)  In the frontend: This information has to be displayed directly near the price information (in the html code: mainly directly after the price - with it's own css class for styling).  What do you think? Can HikaShop achive these jobs? ;)  Cheers Rusty")*

> nicolas wrote: And with the cart fee plugin, you can have a formula to automatically calculate the sum of the fee of each product in the cart and add it as an extra line between the subtotal and the total.

Okay ... I bought the plugin. But I struggle with the use.
I have to set a condition and a formula. But not sure how exactly to do.

I created a custom field "pfand" as text. And filled it with a value (a price, maybe: 3.00).

Then I went to the fee plugin.
I think my condition must be something like "{product.pfand}==1" or so ... because the fee should only be calculated if the custom field is filled.
The value of my field (pfand) is displayed in the cart - but only as single value. If I raise the amount of the product, it remains by its single price.

I have to calculate the value * amount of product - for each product. The sum of the value (pfand) must be displayed in a separate line in the cart.
For the formula I need help, please! ![:-)](/media/kunena/emoticons/3.png ":-)")
I tried this: abs({product.pfand})*{product.price} ... but doesn't work. The value of "pfand" is not multiplied by the amount of the product. And the line "sum of pfand" is missing too. Need help!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzkwOTEyOC1ib3R0bGUtZGVwb3NpdC1hbmQtYmFzZS1wcmljZS1pbmZvcm1hdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14278
-
-

1 year 6 months ago [\#366652](#366652) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Bottle deposit and base price information](/forum/2-general-talk-about-hikashop/909128-bottle-deposit-and-base-price-information#366652 "Hi!  We're looking for an e-commerce solution based on Joomla. Since HikaShop is well know in the last years, I would give it a try. But there are two things I'm not sure about.  #1 Bottle deposit  I want to create an online shop for a &quot;Drinks Market&quot;. This market is based in Germany. Here you have to handle with &quot;bottle deposit&quot;. This is an additional price per product, that have to be displayed on the product listings, product details page, shopping cart, order mail and invoice.  As far as I know, HikaShop does not offer such an extension.  But maybe it can be realized with HikaShop. Would it be possible to use custom fields (for products) for deposit values? These deposit values have to be displayed &#95;and&#95; calculated as SUMMARIZED deposit value in the shopping cart (and order mail, invoice).  One example: Let's say, we have two products in the shopping cart...  product price 1 = 10,00 € deposit price 1 = 3,00 € product price 2 = 5,00 € deposit price 2 = 1,00 €  The shopping cart shows the product prices (single and summarized, as per default) and adds another line &quot;deposit&quot;, that shows the sum of all deposit prices (in the example: 4,00 €). So the final result is the summarized price of 19,00 €.  #2 Base price information  Here in germany exists a regulation for price information (&quot;Preisangabenverordnung&quot; -&gt; &quot;Price Indication Ordinance&quot; or &quot;base price&quot;). It means, that if we sell packages or goods by weight/volume/quantitiy/bulk we have to display the base price per unit.  One example: A product - let's say a water bottle - contains 0,5 l. The price is 0,90 €. On the product listing page and the product details page the following has to be displayed:  Price: 0,90 € (as usually) Content: 0,5 Litre (1,80 € / 1 Litre)  Now I try to describe the need..  For the configuration (in the backend) I would need two fields:  &#91;UNIT&#95;VALUE&#93; - in my example &quot;0,5&quot; &#91;UNIT&#95;BASE&#95;VALUE&#93; - in my example &quot;1&quot;  Now we need a little calculation for the base price per unit: &#91;BASE&#95;PRICE&#93; = &#91;ARTICLE&#95;PRICE&#93; / &#91;UNIT&#95;VALUE&#93; Now we need to display the result in the frontend - on following pages: ARTICLE&#95;LISTINGS and ARTICLE&#95;DETAIL&#95;PAGE - like this:  Content: &#91;UNIT&#95;VALUE&#93; &#91;UNIT&#93; (&#91;BASE&#95;PRICE&#93; € / &#91;UNIT&#95;BASE&#95;VALUE&#93; &#91;UNIT&#93;) ... and now with values: Content: 0.5 Litre (1,80 € &#42; / 1 Liter)  In the frontend: This information has to be displayed directly near the price information (in the html code: mainly directly after the price - with it's own css class for styling).  What do you think? Can HikaShop achive these jobs? ;)  Cheers Rusty")*

Hi,

If you enter a condition like "{product.pfand}==1" then the formula will only be taken into account if the value of pfand is "1" exactly.
So if you have "3" for it in the product in the cart, then the formula will be ignored.

If you leave the condition setting empty, then the formula will be taken into account. So I think you want to leave it empty in your case.

Your formula looks good if you want the fee to be equal to the sum of the product prices times the pfand value.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzkwOTEyOC1ib3R0bGUtZGVwb3NpdC1hbmQtYmFzZS1wcmljZS1pbmZvcm1hdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Rusty](/forum/user/83085-rusty "View Rusty's Profile")**
- [![Rusty's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/83085-rusty "View Rusty's Profile") Topic Author
- [ Offline](/forum/user/83085-rusty)

Less More

- Posts: 105
- Thank you received: 8
-

1 year 6 months ago -  1 year 6 months ago [\#366659](#366659) by [Rusty](/forum/user/83085-rusty "View Rusty's Profile")  Replied by *[Rusty](/forum/user/83085-rusty "View Rusty's Profile")* on topic *[Bottle deposit and base price information](/forum/2-general-talk-about-hikashop/909128-bottle-deposit-and-base-price-information#366659 "Hi!  We're looking for an e-commerce solution based on Joomla. Since HikaShop is well know in the last years, I would give it a try. But there are two things I'm not sure about.  #1 Bottle deposit  I want to create an online shop for a &quot;Drinks Market&quot;. This market is based in Germany. Here you have to handle with &quot;bottle deposit&quot;. This is an additional price per product, that have to be displayed on the product listings, product details page, shopping cart, order mail and invoice.  As far as I know, HikaShop does not offer such an extension.  But maybe it can be realized with HikaShop. Would it be possible to use custom fields (for products) for deposit values? These deposit values have to be displayed &#95;and&#95; calculated as SUMMARIZED deposit value in the shopping cart (and order mail, invoice).  One example: Let's say, we have two products in the shopping cart...  product price 1 = 10,00 € deposit price 1 = 3,00 € product price 2 = 5,00 € deposit price 2 = 1,00 €  The shopping cart shows the product prices (single and summarized, as per default) and adds another line &quot;deposit&quot;, that shows the sum of all deposit prices (in the example: 4,00 €). So the final result is the summarized price of 19,00 €.  #2 Base price information  Here in germany exists a regulation for price information (&quot;Preisangabenverordnung&quot; -&gt; &quot;Price Indication Ordinance&quot; or &quot;base price&quot;). It means, that if we sell packages or goods by weight/volume/quantitiy/bulk we have to display the base price per unit.  One example: A product - let's say a water bottle - contains 0,5 l. The price is 0,90 €. On the product listing page and the product details page the following has to be displayed:  Price: 0,90 € (as usually) Content: 0,5 Litre (1,80 € / 1 Litre)  Now I try to describe the need..  For the configuration (in the backend) I would need two fields:  &#91;UNIT&#95;VALUE&#93; - in my example &quot;0,5&quot; &#91;UNIT&#95;BASE&#95;VALUE&#93; - in my example &quot;1&quot;  Now we need a little calculation for the base price per unit: &#91;BASE&#95;PRICE&#93; = &#91;ARTICLE&#95;PRICE&#93; / &#91;UNIT&#95;VALUE&#93; Now we need to display the result in the frontend - on following pages: ARTICLE&#95;LISTINGS and ARTICLE&#95;DETAIL&#95;PAGE - like this:  Content: &#91;UNIT&#95;VALUE&#93; &#91;UNIT&#93; (&#91;BASE&#95;PRICE&#93; € / &#91;UNIT&#95;BASE&#95;VALUE&#93; &#91;UNIT&#93;) ... and now with values: Content: 0.5 Litre (1,80 € &#42; / 1 Liter)  In the frontend: This information has to be displayed directly near the price information (in the html code: mainly directly after the price - with it's own css class for styling).  What do you think? Can HikaShop achive these jobs? ;)  Cheers Rusty")*

> nicolas wrote: If you enter a condition like "{product.pfand}==1" then the formula will only be taken into account if the value of pfand is "1" exactly.
> So if you have "3" for it in the product in the cart, then the formula will be ignored.

Ah okay, missunderstood the principles. I thought the boolean means "1" is true. Wasn't aware that it checks the exact value.

> nicolas wrote: If you leave the condition setting empty, then the formula will be taken into account. So I think you want to leave it empty in your case.
>
> Your formula looks good if you want the fee to be equal to the sum of the product prices times the pfand value.

Hm ... if I leave the condition empty and use only the formula which is - as you said - good, then the whole website is broken. When I press F5, I get the following error:
Code:

0 Unsupported operand types: string + float Go Home

What to do? ![:-)](/media/kunena/emoticons/3.png ":-)")

P.S. I read the plugin info text again. And now I'm confused a little bit. You suggested to leave the conditions empty. But the info text says:
"... if you leave the condition empty, the formula will be ignored." Hm ...

Last edit: 1 year 6 months ago by [Rusty](/forum/user/83085-rusty "View Rusty's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzkwOTEyOC1ib3R0bGUtZGVwb3NpdC1hbmQtYmFzZS1wcmljZS1pbmZvcm1hdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14278
-
-

1 year 6 months ago [\#366665](#366665) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Bottle deposit and base price information](/forum/2-general-talk-about-hikashop/909128-bottle-deposit-and-base-price-information#366665 "Hi!  We're looking for an e-commerce solution based on Joomla. Since HikaShop is well know in the last years, I would give it a try. But there are two things I'm not sure about.  #1 Bottle deposit  I want to create an online shop for a &quot;Drinks Market&quot;. This market is based in Germany. Here you have to handle with &quot;bottle deposit&quot;. This is an additional price per product, that have to be displayed on the product listings, product details page, shopping cart, order mail and invoice.  As far as I know, HikaShop does not offer such an extension.  But maybe it can be realized with HikaShop. Would it be possible to use custom fields (for products) for deposit values? These deposit values have to be displayed &#95;and&#95; calculated as SUMMARIZED deposit value in the shopping cart (and order mail, invoice).  One example: Let's say, we have two products in the shopping cart...  product price 1 = 10,00 € deposit price 1 = 3,00 € product price 2 = 5,00 € deposit price 2 = 1,00 €  The shopping cart shows the product prices (single and summarized, as per default) and adds another line &quot;deposit&quot;, that shows the sum of all deposit prices (in the example: 4,00 €). So the final result is the summarized price of 19,00 €.  #2 Base price information  Here in germany exists a regulation for price information (&quot;Preisangabenverordnung&quot; -&gt; &quot;Price Indication Ordinance&quot; or &quot;base price&quot;). It means, that if we sell packages or goods by weight/volume/quantitiy/bulk we have to display the base price per unit.  One example: A product - let's say a water bottle - contains 0,5 l. The price is 0,90 €. On the product listing page and the product details page the following has to be displayed:  Price: 0,90 € (as usually) Content: 0,5 Litre (1,80 € / 1 Litre)  Now I try to describe the need..  For the configuration (in the backend) I would need two fields:  &#91;UNIT&#95;VALUE&#93; - in my example &quot;0,5&quot; &#91;UNIT&#95;BASE&#95;VALUE&#93; - in my example &quot;1&quot;  Now we need a little calculation for the base price per unit: &#91;BASE&#95;PRICE&#93; = &#91;ARTICLE&#95;PRICE&#93; / &#91;UNIT&#95;VALUE&#93; Now we need to display the result in the frontend - on following pages: ARTICLE&#95;LISTINGS and ARTICLE&#95;DETAIL&#95;PAGE - like this:  Content: &#91;UNIT&#95;VALUE&#93; &#91;UNIT&#93; (&#91;BASE&#95;PRICE&#93; € / &#91;UNIT&#95;BASE&#95;VALUE&#93; &#91;UNIT&#93;) ... and now with values: Content: 0.5 Litre (1,80 € &#42; / 1 Liter)  In the frontend: This information has to be displayed directly near the price information (in the html code: mainly directly after the price - with it's own css class for styling).  What do you think? Can HikaShop achive these jobs? ;)  Cheers Rusty")*

Hi,

First, you need to activate the "debug" setting of the Joomla backend configuration page in order to get the full error message.
The abbreviated message you provided doesn't provide enough information to be able to say what the problem is.

Also, please provide a screenshot of the settings of your custom field and of the settings of the cart fees plugin please.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzkwOTEyOC1ib3R0bGUtZGVwb3NpdC1hbmQtYmFzZS1wcmljZS1pbmZvcm1hdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Rusty](/forum/user/83085-rusty "View Rusty's Profile")**
- [![Rusty's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/83085-rusty "View Rusty's Profile") Topic Author
- [ Offline](/forum/user/83085-rusty)

Less More

- Posts: 105
- Thank you received: 8
-

1 year 6 months ago -  1 year 6 months ago [\#366668](#366668) by [Rusty](/forum/user/83085-rusty "View Rusty's Profile")  Replied by *[Rusty](/forum/user/83085-rusty "View Rusty's Profile")* on topic *[Bottle deposit and base price information](/forum/2-general-talk-about-hikashop/909128-bottle-deposit-and-base-price-information#366668 "Hi!  We're looking for an e-commerce solution based on Joomla. Since HikaShop is well know in the last years, I would give it a try. But there are two things I'm not sure about.  #1 Bottle deposit  I want to create an online shop for a &quot;Drinks Market&quot;. This market is based in Germany. Here you have to handle with &quot;bottle deposit&quot;. This is an additional price per product, that have to be displayed on the product listings, product details page, shopping cart, order mail and invoice.  As far as I know, HikaShop does not offer such an extension.  But maybe it can be realized with HikaShop. Would it be possible to use custom fields (for products) for deposit values? These deposit values have to be displayed &#95;and&#95; calculated as SUMMARIZED deposit value in the shopping cart (and order mail, invoice).  One example: Let's say, we have two products in the shopping cart...  product price 1 = 10,00 € deposit price 1 = 3,00 € product price 2 = 5,00 € deposit price 2 = 1,00 €  The shopping cart shows the product prices (single and summarized, as per default) and adds another line &quot;deposit&quot;, that shows the sum of all deposit prices (in the example: 4,00 €). So the final result is the summarized price of 19,00 €.  #2 Base price information  Here in germany exists a regulation for price information (&quot;Preisangabenverordnung&quot; -&gt; &quot;Price Indication Ordinance&quot; or &quot;base price&quot;). It means, that if we sell packages or goods by weight/volume/quantitiy/bulk we have to display the base price per unit.  One example: A product - let's say a water bottle - contains 0,5 l. The price is 0,90 €. On the product listing page and the product details page the following has to be displayed:  Price: 0,90 € (as usually) Content: 0,5 Litre (1,80 € / 1 Litre)  Now I try to describe the need..  For the configuration (in the backend) I would need two fields:  &#91;UNIT&#95;VALUE&#93; - in my example &quot;0,5&quot; &#91;UNIT&#95;BASE&#95;VALUE&#93; - in my example &quot;1&quot;  Now we need a little calculation for the base price per unit: &#91;BASE&#95;PRICE&#93; = &#91;ARTICLE&#95;PRICE&#93; / &#91;UNIT&#95;VALUE&#93; Now we need to display the result in the frontend - on following pages: ARTICLE&#95;LISTINGS and ARTICLE&#95;DETAIL&#95;PAGE - like this:  Content: &#91;UNIT&#95;VALUE&#93; &#91;UNIT&#93; (&#91;BASE&#95;PRICE&#93; € / &#91;UNIT&#95;BASE&#95;VALUE&#93; &#91;UNIT&#93;) ... and now with values: Content: 0.5 Litre (1,80 € &#42; / 1 Liter)  In the frontend: This information has to be displayed directly near the price information (in the html code: mainly directly after the price - with it's own css class for styling).  What do you think? Can HikaShop achive these jobs? ;)  Cheers Rusty")*

@nicolas
I just realised something. Could it be a problem that the custom field is type "text"? If so, what field type should I use instead? Something like "integer" is not supported.

Here the debug info:
Code:

ERROR 0 - Unsupported operand types: string + float in /var/www/path_to_website/plugins/hikashop/fees/fees.php:117 Call Stack # Function Location 1 () JROOT/plugins/hikashop/fees/fees.php:117 2 plgHikashopFees-&gt;_replaceProductTags() JROOT/plugins/hikashop/fees/fees.php:75 3 plgHikashopFees-&gt;onAfterCartShippingLoad() JROOT/libraries/src/Plugin/CMSPlugin.php:289 4 Joomla\CMS\Plugin\CMSPlugin-&gt;{closure:Joomla\CMS\Plugin\CMSPlugin::registerLegacyListener():273}() JROOT/libraries/vendor/joomla/event/src/Dispatcher.php:454 5 Joomla\Event\Dispatcher-&gt;dispatch() JROOT/libraries/src/Application/EventAware.php:111 6 Joomla\CMS\Application\WebApplication-&gt;triggerEvent() JROOT/administrator/components/com_hikashop/classes/cart.php:1448 7 hikashopCartClass-&gt;getFullCart() JROOT/components/com_hikashop/views/product/view.html.php:2522 8 ProductViewProduct-&gt;cart() JROOT/components/com_hikashop/views/product/view.html.php:29 9 ProductViewProduct-&gt;display() JROOT/administrator/components/com_hikashop/helpers/helper.php:937 10 hikashop_getLayout() JROOT/modules/mod_hikashop_cart/mod_hikashop_cart.php:73 11 include() JROOT/libraries/src/Dispatcher/ModuleDispatcher.php:52 12 Joomla\CMS\Dispatcher\ModuleDispatcher::{closure:Joomla\CMS\Dispatcher\ModuleDispatcher::dispatch():43}() JROOT/libraries/src/Dispatcher/ModuleDispatcher.php:55 13 Joomla\CMS\Dispatcher\ModuleDispatcher-&gt;dispatch() JROOT/libraries/src/Helper/ModuleHelper.php:289 14 Joomla\CMS\Helper\ModuleHelper::renderRawModule() JROOT/libraries/src/Helper/ModuleHelper.php:160 15 Joomla\CMS\Helper\ModuleHelper::renderModule() JROOT/libraries/src/Document/Renderer/Html/ModuleRenderer.php:99 16 Joomla\CMS\Document\Renderer\Html\ModuleRenderer-&gt;render() JROOT/libraries/astroid/framework/library/astroid/Document.php:650 17 Astroid\Document-&gt;_moduleId() JROOT/libraries/astroid/framework/library/astroid/Document.php:617 18 Astroid\Document-&gt;loadModule() JROOT/libraries/astroid/framework/elements/module_position/module_position.php:22 19 include() JROOT/libraries/src/Layout/FileLayout.php:128 20 Joomla\CMS\Layout\FileLayout-&gt;render() JROOT/libraries/astroid/framework/library/astroid/Element/Element.php:62 21 Astroid\Element\Element-&gt;_content() JROOT/libraries/astroid/framework/library/astroid/Element/Element.php:51 22 Astroid\Element\Element-&gt;render() JROOT/libraries/astroid/framework/library/astroid/Element/Column.php:46 23 Astroid\Element\Column-&gt;render() JROOT/libraries/astroid/framework/library/astroid/Element/Row.php:46 24 Astroid\Element\Row-&gt;render() JROOT/libraries/astroid/framework/library/astroid/Element/Section.php:27 25 Astroid\Element\Section-&gt;render() JROOT/libraries/astroid/framework/library/astroid/Element/Layout.php:37 26 Astroid\Element\Layout::render() JROOT/libraries/astroid/framework/frontend/document/body.php:93 27 include() JROOT/libraries/src/Layout/FileLayout.php:128 28 Joomla\CMS\Layout\FileLayout-&gt;render() JROOT/libraries/astroid/framework/library/astroid/Document.php:130 29 Astroid\Document-&gt;include() JROOT/templates/astroid_template_two/index.php:35 30 require() JROOT/libraries/src/Document/HtmlDocument.php:731 31 Joomla\CMS\Document\HtmlDocument-&gt;_loadTemplate() JROOT/libraries/src/Document/HtmlDocument.php:785 32 Joomla\CMS\Document\HtmlDocument-&gt;_fetchTemplate() JROOT/libraries/src/Document/HtmlDocument.php:622 33 Joomla\CMS\Document\HtmlDocument-&gt;parse() JROOT/libraries/src/Application/CMSApplication.php:1106 34 Joomla\CMS\Application\CMSApplication-&gt;render() JROOT/libraries/src/Application/SiteApplication.php:761 35 Joomla\CMS\Application\SiteApplication-&gt;render() JROOT/libraries/src/Application/CMSApplication.php:311 36 Joomla\CMS\Application\CMSApplication-&gt;execute() JROOT/includes/app.php:58 37 require_once() JROOT/index.php:32

- [ ![Screenshot2025-04-15141226.png](/forum/attachment/60440) ](/forum/attachment/60440 "...4-15141226.png") [ ](/forum/attachment/60440?download=1 "...4-15141226.png")
- [ ![Screenshot2025-04-15141355pfand.png](/forum/attachment/60441) ](/forum/attachment/60441 "...41355pfand.png") [ ](/forum/attachment/60441?download=1 "...41355pfand.png")

Last edit: 1 year 6 months ago by [Rusty](/forum/user/83085-rusty "View Rusty's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzkwOTEyOC1ib3R0bGUtZGVwb3NpdC1hbmQtYmFzZS1wcmljZS1pbmZvcm1hdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14278
-
-

1 year 6 months ago [\#366671](#366671) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Bottle deposit and base price information](/forum/2-general-talk-about-hikashop/909128-bottle-deposit-and-base-price-information#366671 "Hi!  We're looking for an e-commerce solution based on Joomla. Since HikaShop is well know in the last years, I would give it a try. But there are two things I'm not sure about.  #1 Bottle deposit  I want to create an online shop for a &quot;Drinks Market&quot;. This market is based in Germany. Here you have to handle with &quot;bottle deposit&quot;. This is an additional price per product, that have to be displayed on the product listings, product details page, shopping cart, order mail and invoice.  As far as I know, HikaShop does not offer such an extension.  But maybe it can be realized with HikaShop. Would it be possible to use custom fields (for products) for deposit values? These deposit values have to be displayed &#95;and&#95; calculated as SUMMARIZED deposit value in the shopping cart (and order mail, invoice).  One example: Let's say, we have two products in the shopping cart...  product price 1 = 10,00 € deposit price 1 = 3,00 € product price 2 = 5,00 € deposit price 2 = 1,00 €  The shopping cart shows the product prices (single and summarized, as per default) and adds another line &quot;deposit&quot;, that shows the sum of all deposit prices (in the example: 4,00 €). So the final result is the summarized price of 19,00 €.  #2 Base price information  Here in germany exists a regulation for price information (&quot;Preisangabenverordnung&quot; -&gt; &quot;Price Indication Ordinance&quot; or &quot;base price&quot;). It means, that if we sell packages or goods by weight/volume/quantitiy/bulk we have to display the base price per unit.  One example: A product - let's say a water bottle - contains 0,5 l. The price is 0,90 €. On the product listing page and the product details page the following has to be displayed:  Price: 0,90 € (as usually) Content: 0,5 Litre (1,80 € / 1 Litre)  Now I try to describe the need..  For the configuration (in the backend) I would need two fields:  &#91;UNIT&#95;VALUE&#93; - in my example &quot;0,5&quot; &#91;UNIT&#95;BASE&#95;VALUE&#93; - in my example &quot;1&quot;  Now we need a little calculation for the base price per unit: &#91;BASE&#95;PRICE&#93; = &#91;ARTICLE&#95;PRICE&#93; / &#91;UNIT&#95;VALUE&#93; Now we need to display the result in the frontend - on following pages: ARTICLE&#95;LISTINGS and ARTICLE&#95;DETAIL&#95;PAGE - like this:  Content: &#91;UNIT&#95;VALUE&#93; &#91;UNIT&#93; (&#91;BASE&#95;PRICE&#93; € / &#91;UNIT&#95;BASE&#95;VALUE&#93; &#91;UNIT&#93;) ... and now with values: Content: 0.5 Litre (1,80 € &#42; / 1 Liter)  In the frontend: This information has to be displayed directly near the price information (in the html code: mainly directly after the price - with it's own css class for styling).  What do you think? Can HikaShop achive these jobs? ;)  Cheers Rusty")*

Hi,

No, the problem is not that the type of the custom field is "text".
It's actually a bug with the cart fees plugin and the use of the {product.price} tag.
I've made a patch for it.
Download again the install package of the plugin on our website and install it on yours and you should not have that error anymore.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzkwOTEyOC1ib3R0bGUtZGVwb3NpdC1hbmQtYmFzZS1wcmljZS1pbmZvcm1hdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Rusty](/forum/user/83085-rusty "View Rusty's Profile")**
- [![Rusty's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/83085-rusty "View Rusty's Profile") Topic Author
- [ Offline](/forum/user/83085-rusty)

Less More

- Posts: 105
- Thank you received: 8
-

1 year 6 months ago [\#366679](#366679) by [Rusty](/forum/user/83085-rusty "View Rusty's Profile")  Replied by *[Rusty](/forum/user/83085-rusty "View Rusty's Profile")* on topic *[Bottle deposit and base price information](/forum/2-general-talk-about-hikashop/909128-bottle-deposit-and-base-price-information#366679 "Hi!  We're looking for an e-commerce solution based on Joomla. Since HikaShop is well know in the last years, I would give it a try. But there are two things I'm not sure about.  #1 Bottle deposit  I want to create an online shop for a &quot;Drinks Market&quot;. This market is based in Germany. Here you have to handle with &quot;bottle deposit&quot;. This is an additional price per product, that have to be displayed on the product listings, product details page, shopping cart, order mail and invoice.  As far as I know, HikaShop does not offer such an extension.  But maybe it can be realized with HikaShop. Would it be possible to use custom fields (for products) for deposit values? These deposit values have to be displayed &#95;and&#95; calculated as SUMMARIZED deposit value in the shopping cart (and order mail, invoice).  One example: Let's say, we have two products in the shopping cart...  product price 1 = 10,00 € deposit price 1 = 3,00 € product price 2 = 5,00 € deposit price 2 = 1,00 €  The shopping cart shows the product prices (single and summarized, as per default) and adds another line &quot;deposit&quot;, that shows the sum of all deposit prices (in the example: 4,00 €). So the final result is the summarized price of 19,00 €.  #2 Base price information  Here in germany exists a regulation for price information (&quot;Preisangabenverordnung&quot; -&gt; &quot;Price Indication Ordinance&quot; or &quot;base price&quot;). It means, that if we sell packages or goods by weight/volume/quantitiy/bulk we have to display the base price per unit.  One example: A product - let's say a water bottle - contains 0,5 l. The price is 0,90 €. On the product listing page and the product details page the following has to be displayed:  Price: 0,90 € (as usually) Content: 0,5 Litre (1,80 € / 1 Litre)  Now I try to describe the need..  For the configuration (in the backend) I would need two fields:  &#91;UNIT&#95;VALUE&#93; - in my example &quot;0,5&quot; &#91;UNIT&#95;BASE&#95;VALUE&#93; - in my example &quot;1&quot;  Now we need a little calculation for the base price per unit: &#91;BASE&#95;PRICE&#93; = &#91;ARTICLE&#95;PRICE&#93; / &#91;UNIT&#95;VALUE&#93; Now we need to display the result in the frontend - on following pages: ARTICLE&#95;LISTINGS and ARTICLE&#95;DETAIL&#95;PAGE - like this:  Content: &#91;UNIT&#95;VALUE&#93; &#91;UNIT&#93; (&#91;BASE&#95;PRICE&#93; € / &#91;UNIT&#95;BASE&#95;VALUE&#93; &#91;UNIT&#93;) ... and now with values: Content: 0.5 Litre (1,80 € &#42; / 1 Liter)  In the frontend: This information has to be displayed directly near the price information (in the html code: mainly directly after the price - with it's own css class for styling).  What do you think? Can HikaShop achive these jobs? ;)  Cheers Rusty")*

> nicolas wrote: It's actually a bug with the cart fees plugin and the use of the {product.price} tag.
> I've made a patch for it.
> Download again the install package of the plugin on our website and install it on yours and you should not have that error anymore.

I guess it's not fixed. ![:-(](/media/kunena/emoticons/22.png ":-(")
Code:

0 abs(): Argument #1 ($num) must be of type int&#124;float, string given Go Home ERROR 0 - abs(): Argument #1 ($num) must be of type int&#124;float, string given in /var/www/path_to_website/administrator/components/com_hikashop/inc/expression.php:348 Call Stack # Function Location 1 () JROOT/administrator/components/com_hikashop/inc/expression.php:348 2 abs() JROOT/administrator/components/com_hikashop/inc/expression.php:348 3 HikashopExpressionInc-&gt;pfx() JROOT/administrator/components/com_hikashop/inc/expression.php:80 4 HikashopExpressionInc-&gt;evaluate() JROOT/plugins/hikashop/fees/fees.php:276 5 plgHikashopFees-&gt;_evaluate() JROOT/plugins/hikashop/fees/fees.php:77 6 plgHikashopFees-&gt;onAfterCartShippingLoad() JROOT/libraries/src/Plugin/CMSPlugin.php:289 7 Joomla\CMS\Plugin\CMSPlugin-&gt;{closure:Joomla\CMS\Plugin\CMSPlugin::registerLegacyListener():273}() JROOT/libraries/vendor/joomla/event/src/Dispatcher.php:454 8 Joomla\Event\Dispatcher-&gt;dispatch() JROOT/libraries/src/Application/EventAware.php:111 9 Joomla\CMS\Application\WebApplication-&gt;triggerEvent() JROOT/administrator/components/com_hikashop/classes/cart.php:1448 10 hikashopCartClass-&gt;getFullCart() JROOT/components/com_hikashop/views/product/view.html.php:2522 11 ProductViewProduct-&gt;cart() JROOT/components/com_hikashop/views/product/view.html.php:29 12 ProductViewProduct-&gt;display() JROOT/administrator/components/com_hikashop/helpers/helper.php:937 13 hikashop_getLayout() JROOT/modules/mod_hikashop_cart/mod_hikashop_cart.php:73 14 include() JROOT/libraries/src/Dispatcher/ModuleDispatcher.php:52 15 Joomla\CMS\Dispatcher\ModuleDispatcher::{closure:Joomla\CMS\Dispatcher\ModuleDispatcher::dispatch():43}() JROOT/libraries/src/Dispatcher/ModuleDispatcher.php:55 16 Joomla\CMS\Dispatcher\ModuleDispatcher-&gt;dispatch() JROOT/libraries/src/Helper/ModuleHelper.php:289 17 Joomla\CMS\Helper\ModuleHelper::renderRawModule() JROOT/libraries/src/Helper/ModuleHelper.php:160 18 Joomla\CMS\Helper\ModuleHelper::renderModule() JROOT/libraries/src/Document/Renderer/Html/ModuleRenderer.php:99 19 Joomla\CMS\Document\Renderer\Html\ModuleRenderer-&gt;render() JROOT/libraries/astroid/framework/library/astroid/Document.php:650 20 Astroid\Document-&gt;_moduleId() JROOT/libraries/astroid/framework/library/astroid/Document.php:617 21 Astroid\Document-&gt;loadModule() JROOT/libraries/astroid/framework/elements/module_position/module_position.php:22 22 include() JROOT/libraries/src/Layout/FileLayout.php:128 23 Joomla\CMS\Layout\FileLayout-&gt;render() JROOT/libraries/astroid/framework/library/astroid/Element/Element.php:62 24 Astroid\Element\Element-&gt;_content() JROOT/libraries/astroid/framework/library/astroid/Element/Element.php:51 25 Astroid\Element\Element-&gt;render() JROOT/libraries/astroid/framework/library/astroid/Element/Column.php:46 26 Astroid\Element\Column-&gt;render() JROOT/libraries/astroid/framework/library/astroid/Element/Row.php:46 27 Astroid\Element\Row-&gt;render() JROOT/libraries/astroid/framework/library/astroid/Element/Section.php:27 28 Astroid\Element\Section-&gt;render() JROOT/libraries/astroid/framework/library/astroid/Element/Layout.php:37 29 Astroid\Element\Layout::render() JROOT/libraries/astroid/framework/frontend/document/body.php:93 30 include() JROOT/libraries/src/Layout/FileLayout.php:128 31 Joomla\CMS\Layout\FileLayout-&gt;render() JROOT/libraries/astroid/framework/library/astroid/Document.php:130 32 Astroid\Document-&gt;include() JROOT/templates/astroid_template_two/index.php:35 33 require() JROOT/libraries/src/Document/HtmlDocument.php:731 34 Joomla\CMS\Document\HtmlDocument-&gt;_loadTemplate() JROOT/libraries/src/Document/HtmlDocument.php:785 35 Joomla\CMS\Document\HtmlDocument-&gt;_fetchTemplate() JROOT/libraries/src/Document/HtmlDocument.php:622 36 Joomla\CMS\Document\HtmlDocument-&gt;parse() JROOT/libraries/src/Application/CMSApplication.php:1106 37 Joomla\CMS\Application\CMSApplication-&gt;render() JROOT/libraries/src/Application/SiteApplication.php:761 38 Joomla\CMS\Application\SiteApplication-&gt;render() JROOT/libraries/src/Application/CMSApplication.php:311 39 Joomla\CMS\Application\CMSApplication-&gt;execute() JROOT/includes/app.php:58 40 require_once() JROOT/index.php:32

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzkwOTEyOC1ib3R0bGUtZGVwb3NpdC1hbmQtYmFzZS1wcmljZS1pbmZvcm1hdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14278
-
-

1 year 6 months ago [\#366681](#366681) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Bottle deposit and base price information](/forum/2-general-talk-about-hikashop/909128-bottle-deposit-and-base-price-information#366681 "Hi!  We're looking for an e-commerce solution based on Joomla. Since HikaShop is well know in the last years, I would give it a try. But there are two things I'm not sure about.  #1 Bottle deposit  I want to create an online shop for a &quot;Drinks Market&quot;. This market is based in Germany. Here you have to handle with &quot;bottle deposit&quot;. This is an additional price per product, that have to be displayed on the product listings, product details page, shopping cart, order mail and invoice.  As far as I know, HikaShop does not offer such an extension.  But maybe it can be realized with HikaShop. Would it be possible to use custom fields (for products) for deposit values? These deposit values have to be displayed &#95;and&#95; calculated as SUMMARIZED deposit value in the shopping cart (and order mail, invoice).  One example: Let's say, we have two products in the shopping cart...  product price 1 = 10,00 € deposit price 1 = 3,00 € product price 2 = 5,00 € deposit price 2 = 1,00 €  The shopping cart shows the product prices (single and summarized, as per default) and adds another line &quot;deposit&quot;, that shows the sum of all deposit prices (in the example: 4,00 €). So the final result is the summarized price of 19,00 €.  #2 Base price information  Here in germany exists a regulation for price information (&quot;Preisangabenverordnung&quot; -&gt; &quot;Price Indication Ordinance&quot; or &quot;base price&quot;). It means, that if we sell packages or goods by weight/volume/quantitiy/bulk we have to display the base price per unit.  One example: A product - let's say a water bottle - contains 0,5 l. The price is 0,90 €. On the product listing page and the product details page the following has to be displayed:  Price: 0,90 € (as usually) Content: 0,5 Litre (1,80 € / 1 Litre)  Now I try to describe the need..  For the configuration (in the backend) I would need two fields:  &#91;UNIT&#95;VALUE&#93; - in my example &quot;0,5&quot; &#91;UNIT&#95;BASE&#95;VALUE&#93; - in my example &quot;1&quot;  Now we need a little calculation for the base price per unit: &#91;BASE&#95;PRICE&#93; = &#91;ARTICLE&#95;PRICE&#93; / &#91;UNIT&#95;VALUE&#93; Now we need to display the result in the frontend - on following pages: ARTICLE&#95;LISTINGS and ARTICLE&#95;DETAIL&#95;PAGE - like this:  Content: &#91;UNIT&#95;VALUE&#93; &#91;UNIT&#93; (&#91;BASE&#95;PRICE&#93; € / &#91;UNIT&#95;BASE&#95;VALUE&#93; &#91;UNIT&#93;) ... and now with values: Content: 0.5 Litre (1,80 € &#42; / 1 Liter)  In the frontend: This information has to be displayed directly near the price information (in the html code: mainly directly after the price - with it's own css class for styling).  What do you think? Can HikaShop achive these jobs? ;)  Cheers Rusty")*

Hi,

That's not the same error. The previous error has been fixed by my patch. Unfortunately, I can't fix errors I didn't see yet ![:)](/media/kunena/emoticons/3.png ":)")
Now, the new error says that you apparently have something which is not a number in the pfand custom field in one of the products.

Change the formula to : Code:

abs(decimal({product.pfand}))*{product.price}

and it should prevent the error from happening as it will force the conversion of the string to a number.
Now, that also means that you might not get the result you expect for the calculation because converting a string to a number can lead to strange results based on what you have in the string. So you might have to check what you have in the custom field of the products to make sure you don't have spaces at the beginning or the end for example, only numbers.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzkwOTEyOC1ib3R0bGUtZGVwb3NpdC1hbmQtYmFzZS1wcmljZS1pbmZvcm1hdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Rusty](/forum/user/83085-rusty "View Rusty's Profile")**
- [![Rusty's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/83085-rusty "View Rusty's Profile") Topic Author
- [ Offline](/forum/user/83085-rusty)

Less More

- Posts: 105
- Thank you received: 8
-

1 year 6 months ago -  1 year 6 months ago [\#366685](#366685) by [Rusty](/forum/user/83085-rusty "View Rusty's Profile")  Replied by *[Rusty](/forum/user/83085-rusty "View Rusty's Profile")* on topic *[Bottle deposit and base price information](/forum/2-general-talk-about-hikashop/909128-bottle-deposit-and-base-price-information#366685 "Hi!  We're looking for an e-commerce solution based on Joomla. Since HikaShop is well know in the last years, I would give it a try. But there are two things I'm not sure about.  #1 Bottle deposit  I want to create an online shop for a &quot;Drinks Market&quot;. This market is based in Germany. Here you have to handle with &quot;bottle deposit&quot;. This is an additional price per product, that have to be displayed on the product listings, product details page, shopping cart, order mail and invoice.  As far as I know, HikaShop does not offer such an extension.  But maybe it can be realized with HikaShop. Would it be possible to use custom fields (for products) for deposit values? These deposit values have to be displayed &#95;and&#95; calculated as SUMMARIZED deposit value in the shopping cart (and order mail, invoice).  One example: Let's say, we have two products in the shopping cart...  product price 1 = 10,00 € deposit price 1 = 3,00 € product price 2 = 5,00 € deposit price 2 = 1,00 €  The shopping cart shows the product prices (single and summarized, as per default) and adds another line &quot;deposit&quot;, that shows the sum of all deposit prices (in the example: 4,00 €). So the final result is the summarized price of 19,00 €.  #2 Base price information  Here in germany exists a regulation for price information (&quot;Preisangabenverordnung&quot; -&gt; &quot;Price Indication Ordinance&quot; or &quot;base price&quot;). It means, that if we sell packages or goods by weight/volume/quantitiy/bulk we have to display the base price per unit.  One example: A product - let's say a water bottle - contains 0,5 l. The price is 0,90 €. On the product listing page and the product details page the following has to be displayed:  Price: 0,90 € (as usually) Content: 0,5 Litre (1,80 € / 1 Litre)  Now I try to describe the need..  For the configuration (in the backend) I would need two fields:  &#91;UNIT&#95;VALUE&#93; - in my example &quot;0,5&quot; &#91;UNIT&#95;BASE&#95;VALUE&#93; - in my example &quot;1&quot;  Now we need a little calculation for the base price per unit: &#91;BASE&#95;PRICE&#93; = &#91;ARTICLE&#95;PRICE&#93; / &#91;UNIT&#95;VALUE&#93; Now we need to display the result in the frontend - on following pages: ARTICLE&#95;LISTINGS and ARTICLE&#95;DETAIL&#95;PAGE - like this:  Content: &#91;UNIT&#95;VALUE&#93; &#91;UNIT&#93; (&#91;BASE&#95;PRICE&#93; € / &#91;UNIT&#95;BASE&#95;VALUE&#93; &#91;UNIT&#93;) ... and now with values: Content: 0.5 Litre (1,80 € &#42; / 1 Liter)  In the frontend: This information has to be displayed directly near the price information (in the html code: mainly directly after the price - with it's own css class for styling).  What do you think? Can HikaShop achive these jobs? ;)  Cheers Rusty")*

> nicolas wrote: Unfortunately, I can't fix errors I didn't see yet ![:)](/media/kunena/emoticons/3.png ":)")

Sorry, not meant to be a reproach!

> nicolas wrote: Now, the new error says that you apparently have something which is not a number in the pfand custom field in one of the products.

I found the problem: I typed in "3,75" instead of "3.75".
This problem comes to account because I changed the decimal system in the currencies configuration. I have replaced "," by "." and vice versa. But the new custom field doesn't "know" this. I think I need to change the formula to convert the "." to "," so that the formula could calculate correctly.

Here I need help (if I think the right way). How to change to formula so that it can convert the custom field decimal system?

Next: The formula works ... more or less as expected. Currently the value of the custom field is multiplied by the product price. I replaced "product.price" with "order.price" for testing reasons. I think I have to multiply the custom field value with the product quantitiy. But I could not find the correct variable. I tried "product.quantity" but this doesn't work.

What do I want to achive?
Let's talk about the cart view ...

Each product line has [custom field] and [quantity] and [price]
-&gt; for each line I have to calculate: [custom field sum] = [custom field] * [quantity]

The summary line of the cart already contains a "sum field" for the custom field. That is great. But it works not as needed.
Here I need: SUM("all product lines [custom field sum]

example of a cart:
Code:

IMG -- PRODUCT NAME -- CUSTOM FIELD -- SINLGE PRICE -- QUANTITY -- TOTAL PRICE ------------------------------------------------------------------------------ img -- product 1 -- 3,75 -- 8,80 -- 2 -- 17,60 img -- product 2 -- 2,00 -- 8,80 -- 1 -- 8,80 ------------------------------------------------------------------------------ Subtotal 26,40 Sum of Custom fields 9,50 TAX 19% 4,22 ------------------------------------------------------------------------------ Total 32,15

How to achive this?

And here comes another important thing: How to apply the tax configuration to the custom field?
"Technical - financial" correct would it be if the custom field's tax is linked to the tax configuration of its product. How to achive this?

In this case we would calculate: ( ( [SUBTOTAL] + [SUM OF CUSTOM FIELDS] ) * TAX ) / 100 * TAX
In the example cart above, the correct TAX would be: 5,73

Last edit: 1 year 6 months ago by [Rusty](/forum/user/83085-rusty "View Rusty's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzkwOTEyOC1ib3R0bGUtZGVwb3NpdC1hbmQtYmFzZS1wcmljZS1pbmZvcm1hdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14278
-
-

1 year 6 months ago [\#366690](#366690) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Bottle deposit and base price information](/forum/2-general-talk-about-hikashop/909128-bottle-deposit-and-base-price-information#366690 "Hi!  We're looking for an e-commerce solution based on Joomla. Since HikaShop is well know in the last years, I would give it a try. But there are two things I'm not sure about.  #1 Bottle deposit  I want to create an online shop for a &quot;Drinks Market&quot;. This market is based in Germany. Here you have to handle with &quot;bottle deposit&quot;. This is an additional price per product, that have to be displayed on the product listings, product details page, shopping cart, order mail and invoice.  As far as I know, HikaShop does not offer such an extension.  But maybe it can be realized with HikaShop. Would it be possible to use custom fields (for products) for deposit values? These deposit values have to be displayed &#95;and&#95; calculated as SUMMARIZED deposit value in the shopping cart (and order mail, invoice).  One example: Let's say, we have two products in the shopping cart...  product price 1 = 10,00 € deposit price 1 = 3,00 € product price 2 = 5,00 € deposit price 2 = 1,00 €  The shopping cart shows the product prices (single and summarized, as per default) and adds another line &quot;deposit&quot;, that shows the sum of all deposit prices (in the example: 4,00 €). So the final result is the summarized price of 19,00 €.  #2 Base price information  Here in germany exists a regulation for price information (&quot;Preisangabenverordnung&quot; -&gt; &quot;Price Indication Ordinance&quot; or &quot;base price&quot;). It means, that if we sell packages or goods by weight/volume/quantitiy/bulk we have to display the base price per unit.  One example: A product - let's say a water bottle - contains 0,5 l. The price is 0,90 €. On the product listing page and the product details page the following has to be displayed:  Price: 0,90 € (as usually) Content: 0,5 Litre (1,80 € / 1 Litre)  Now I try to describe the need..  For the configuration (in the backend) I would need two fields:  &#91;UNIT&#95;VALUE&#93; - in my example &quot;0,5&quot; &#91;UNIT&#95;BASE&#95;VALUE&#93; - in my example &quot;1&quot;  Now we need a little calculation for the base price per unit: &#91;BASE&#95;PRICE&#93; = &#91;ARTICLE&#95;PRICE&#93; / &#91;UNIT&#95;VALUE&#93; Now we need to display the result in the frontend - on following pages: ARTICLE&#95;LISTINGS and ARTICLE&#95;DETAIL&#95;PAGE - like this:  Content: &#91;UNIT&#95;VALUE&#93; &#91;UNIT&#93; (&#91;BASE&#95;PRICE&#93; € / &#91;UNIT&#95;BASE&#95;VALUE&#93; &#91;UNIT&#93;) ... and now with values: Content: 0.5 Litre (1,80 € &#42; / 1 Liter)  In the frontend: This information has to be displayed directly near the price information (in the html code: mainly directly after the price - with it's own css class for styling).  What do you think? Can HikaShop achive these jobs? ;)  Cheers Rusty")*

Hi,

1. If you use the "decimal" function, as I have proposed in my previous message, it should properly take into account the comma.

2. If you want the fee to be the sum of the value in the custom field times the quantity of the product in the cart, you want to use this: Code:

abs(decimal({product.pfand}))*{product.cart_product_quantity}

3. The tax amount cannot, at the moment, take into account the fee added by the plugin. This would require adding an extra option to the plugin to be able to select the tax category, and then some code modifications to process the taxes on the fee when it is added to the cart.
What you could do instead for now would be to add a second formula: Code:

abs(decimal({product.pfand}))*{product.cart_product_quantity}*0.19

with the label "TAX 19% on pfand fee" or something like that.
That way you would have rows like this:
subtotal
pfand fee
pfand fee tax
rest of the tax
total

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzkwOTEyOC1ib3R0bGUtZGVwb3NpdC1hbmQtYmFzZS1wcmljZS1pbmZvcm1hdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Rusty](/forum/user/83085-rusty "View Rusty's Profile")**
- [![Rusty's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/83085-rusty "View Rusty's Profile") Topic Author
- [ Offline](/forum/user/83085-rusty)

Less More

- Posts: 105
- Thank you received: 8
-

1 year 6 months ago -  1 year 6 months ago [\#366699](#366699) by [Rusty](/forum/user/83085-rusty "View Rusty's Profile")  Replied by *[Rusty](/forum/user/83085-rusty "View Rusty's Profile")* on topic *[Bottle deposit and base price information](/forum/2-general-talk-about-hikashop/909128-bottle-deposit-and-base-price-information#366699 "Hi!  We're looking for an e-commerce solution based on Joomla. Since HikaShop is well know in the last years, I would give it a try. But there are two things I'm not sure about.  #1 Bottle deposit  I want to create an online shop for a &quot;Drinks Market&quot;. This market is based in Germany. Here you have to handle with &quot;bottle deposit&quot;. This is an additional price per product, that have to be displayed on the product listings, product details page, shopping cart, order mail and invoice.  As far as I know, HikaShop does not offer such an extension.  But maybe it can be realized with HikaShop. Would it be possible to use custom fields (for products) for deposit values? These deposit values have to be displayed &#95;and&#95; calculated as SUMMARIZED deposit value in the shopping cart (and order mail, invoice).  One example: Let's say, we have two products in the shopping cart...  product price 1 = 10,00 € deposit price 1 = 3,00 € product price 2 = 5,00 € deposit price 2 = 1,00 €  The shopping cart shows the product prices (single and summarized, as per default) and adds another line &quot;deposit&quot;, that shows the sum of all deposit prices (in the example: 4,00 €). So the final result is the summarized price of 19,00 €.  #2 Base price information  Here in germany exists a regulation for price information (&quot;Preisangabenverordnung&quot; -&gt; &quot;Price Indication Ordinance&quot; or &quot;base price&quot;). It means, that if we sell packages or goods by weight/volume/quantitiy/bulk we have to display the base price per unit.  One example: A product - let's say a water bottle - contains 0,5 l. The price is 0,90 €. On the product listing page and the product details page the following has to be displayed:  Price: 0,90 € (as usually) Content: 0,5 Litre (1,80 € / 1 Litre)  Now I try to describe the need..  For the configuration (in the backend) I would need two fields:  &#91;UNIT&#95;VALUE&#93; - in my example &quot;0,5&quot; &#91;UNIT&#95;BASE&#95;VALUE&#93; - in my example &quot;1&quot;  Now we need a little calculation for the base price per unit: &#91;BASE&#95;PRICE&#93; = &#91;ARTICLE&#95;PRICE&#93; / &#91;UNIT&#95;VALUE&#93; Now we need to display the result in the frontend - on following pages: ARTICLE&#95;LISTINGS and ARTICLE&#95;DETAIL&#95;PAGE - like this:  Content: &#91;UNIT&#95;VALUE&#93; &#91;UNIT&#93; (&#91;BASE&#95;PRICE&#93; € / &#91;UNIT&#95;BASE&#95;VALUE&#93; &#91;UNIT&#93;) ... and now with values: Content: 0.5 Litre (1,80 € &#42; / 1 Liter)  In the frontend: This information has to be displayed directly near the price information (in the html code: mainly directly after the price - with it's own css class for styling).  What do you think? Can HikaShop achive these jobs? ;)  Cheers Rusty")*

> nicolas wrote: 1. If you use the "decimal" function, as I have proposed in my previous message, it should properly take into account the comma.
>
> 2\. If you want the fee to be the sum of the value in the custom field times the quantity of the product in the cart, you want to use this:
>
> Code:
>
> abs(decimal({product.pfand}))*{product.cart_product_quantity}

Great! Works as expected! Thank you! ![:)](/media/kunena/emoticons/3.png ":)")

> nicolas wrote: 3. The tax amount cannot, at the moment, take into account the fee added by the plugin. This would require adding an extra option to the plugin to be able to select the tax category, and then some code modifications to process the taxes on the fee when it is added to the cart.
> What you could do instead for now would be to add a second formula:
>
> Code:
>
> abs(decimal({product.pfand}))*{product.cart_product_quantity}*0.19
>
>
>
> with the label "TAX 19% on pfand fee" or something like that.
> That way you would have rows like this:
> subtotal
> pfand fee
> pfand fee tax
> rest of the tax
> total

Hm ... but what if several products have different tax? Let's say we have "Beer" (tax is 19%). Then we have "Milk" (tax is 7%). The tax of the custom field fee must match the tax of the based product. Thing is, I have only these two taxes. Is there any way to create a formula that checks what tax the product has and then use either the 19%-formula or the 7%-formula?

Last edit: 1 year 6 months ago by [Rusty](/forum/user/83085-rusty "View Rusty's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzkwOTEyOC1ib3R0bGUtZGVwb3NpdC1hbmQtYmFzZS1wcmljZS1pbmZvcm1hdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14278
-
-

1 year 6 months ago [\#366701](#366701) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Bottle deposit and base price information](/forum/2-general-talk-about-hikashop/909128-bottle-deposit-and-base-price-information#366701 "Hi!  We're looking for an e-commerce solution based on Joomla. Since HikaShop is well know in the last years, I would give it a try. But there are two things I'm not sure about.  #1 Bottle deposit  I want to create an online shop for a &quot;Drinks Market&quot;. This market is based in Germany. Here you have to handle with &quot;bottle deposit&quot;. This is an additional price per product, that have to be displayed on the product listings, product details page, shopping cart, order mail and invoice.  As far as I know, HikaShop does not offer such an extension.  But maybe it can be realized with HikaShop. Would it be possible to use custom fields (for products) for deposit values? These deposit values have to be displayed &#95;and&#95; calculated as SUMMARIZED deposit value in the shopping cart (and order mail, invoice).  One example: Let's say, we have two products in the shopping cart...  product price 1 = 10,00 € deposit price 1 = 3,00 € product price 2 = 5,00 € deposit price 2 = 1,00 €  The shopping cart shows the product prices (single and summarized, as per default) and adds another line &quot;deposit&quot;, that shows the sum of all deposit prices (in the example: 4,00 €). So the final result is the summarized price of 19,00 €.  #2 Base price information  Here in germany exists a regulation for price information (&quot;Preisangabenverordnung&quot; -&gt; &quot;Price Indication Ordinance&quot; or &quot;base price&quot;). It means, that if we sell packages or goods by weight/volume/quantitiy/bulk we have to display the base price per unit.  One example: A product - let's say a water bottle - contains 0,5 l. The price is 0,90 €. On the product listing page and the product details page the following has to be displayed:  Price: 0,90 € (as usually) Content: 0,5 Litre (1,80 € / 1 Litre)  Now I try to describe the need..  For the configuration (in the backend) I would need two fields:  &#91;UNIT&#95;VALUE&#93; - in my example &quot;0,5&quot; &#91;UNIT&#95;BASE&#95;VALUE&#93; - in my example &quot;1&quot;  Now we need a little calculation for the base price per unit: &#91;BASE&#95;PRICE&#93; = &#91;ARTICLE&#95;PRICE&#93; / &#91;UNIT&#95;VALUE&#93; Now we need to display the result in the frontend - on following pages: ARTICLE&#95;LISTINGS and ARTICLE&#95;DETAIL&#95;PAGE - like this:  Content: &#91;UNIT&#95;VALUE&#93; &#91;UNIT&#93; (&#91;BASE&#95;PRICE&#93; € / &#91;UNIT&#95;BASE&#95;VALUE&#93; &#91;UNIT&#93;) ... and now with values: Content: 0.5 Litre (1,80 € &#42; / 1 Liter)  In the frontend: This information has to be displayed directly near the price information (in the html code: mainly directly after the price - with it's own css class for styling).  What do you think? Can HikaShop achive these jobs? ;)  Cheers Rusty")*

Sure. Create another custom product field where you provide the tax rate in each product, 0.19 or 0.07
Then, instead of 0.19 in the formula, you can use the tag of that custom product field: Code:

abs(decimal({product.pfand}))*{product.cart_product_quantity}*{product.xxx}

where xxx is the column name of that new custom product field.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzkwOTEyOC1ib3R0bGUtZGVwb3NpdC1hbmQtYmFzZS1wcmljZS1pbmZvcm1hdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Rusty](/forum/user/83085-rusty "View Rusty's Profile")**
- [![Rusty's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/83085-rusty "View Rusty's Profile") Topic Author
- [ Offline](/forum/user/83085-rusty)

Less More

- Posts: 105
- Thank you received: 8
-

1 year 6 months ago -  1 year 6 months ago [\#366735](#366735) by [Rusty](/forum/user/83085-rusty "View Rusty's Profile")  Replied by *[Rusty](/forum/user/83085-rusty "View Rusty's Profile")* on topic *[Bottle deposit and base price information](/forum/2-general-talk-about-hikashop/909128-bottle-deposit-and-base-price-information#366735 "Hi!  We're looking for an e-commerce solution based on Joomla. Since HikaShop is well know in the last years, I would give it a try. But there are two things I'm not sure about.  #1 Bottle deposit  I want to create an online shop for a &quot;Drinks Market&quot;. This market is based in Germany. Here you have to handle with &quot;bottle deposit&quot;. This is an additional price per product, that have to be displayed on the product listings, product details page, shopping cart, order mail and invoice.  As far as I know, HikaShop does not offer such an extension.  But maybe it can be realized with HikaShop. Would it be possible to use custom fields (for products) for deposit values? These deposit values have to be displayed &#95;and&#95; calculated as SUMMARIZED deposit value in the shopping cart (and order mail, invoice).  One example: Let's say, we have two products in the shopping cart...  product price 1 = 10,00 € deposit price 1 = 3,00 € product price 2 = 5,00 € deposit price 2 = 1,00 €  The shopping cart shows the product prices (single and summarized, as per default) and adds another line &quot;deposit&quot;, that shows the sum of all deposit prices (in the example: 4,00 €). So the final result is the summarized price of 19,00 €.  #2 Base price information  Here in germany exists a regulation for price information (&quot;Preisangabenverordnung&quot; -&gt; &quot;Price Indication Ordinance&quot; or &quot;base price&quot;). It means, that if we sell packages or goods by weight/volume/quantitiy/bulk we have to display the base price per unit.  One example: A product - let's say a water bottle - contains 0,5 l. The price is 0,90 €. On the product listing page and the product details page the following has to be displayed:  Price: 0,90 € (as usually) Content: 0,5 Litre (1,80 € / 1 Litre)  Now I try to describe the need..  For the configuration (in the backend) I would need two fields:  &#91;UNIT&#95;VALUE&#93; - in my example &quot;0,5&quot; &#91;UNIT&#95;BASE&#95;VALUE&#93; - in my example &quot;1&quot;  Now we need a little calculation for the base price per unit: &#91;BASE&#95;PRICE&#93; = &#91;ARTICLE&#95;PRICE&#93; / &#91;UNIT&#95;VALUE&#93; Now we need to display the result in the frontend - on following pages: ARTICLE&#95;LISTINGS and ARTICLE&#95;DETAIL&#95;PAGE - like this:  Content: &#91;UNIT&#95;VALUE&#93; &#91;UNIT&#93; (&#91;BASE&#95;PRICE&#93; € / &#91;UNIT&#95;BASE&#95;VALUE&#93; &#91;UNIT&#93;) ... and now with values: Content: 0.5 Litre (1,80 € &#42; / 1 Liter)  In the frontend: This information has to be displayed directly near the price information (in the html code: mainly directly after the price - with it's own css class for styling).  What do you think? Can HikaShop achive these jobs? ;)  Cheers Rusty")*

> nicolas wrote: Sure. Create another custom product field where you provide the tax rate in each product, 0.19 or 0.07
> Then, instead of 0.19 in the formula, you can use the tag of that custom product field:
>
> Code:
>
> abs(decimal({product.pfand}))*{product.cart_product_quantity}*{product.xxx}
>
>
>
> where xxx is the column name of that new custom product field.

Thanks for the tip.
Unfortunately, this solution is quite error-prone and complicated for the user. He has to set two times the same tax. First he has to choose the right tax category, then he has to type in the right tax value. I'm sure, this will cause problems. ![;)](/media/kunena/emoticons/24.png ";)")

Is it possible to change the formula to check the tax category of the product, so that the cart can use the value of the tax category as tax for the custom field?

However, I tested it - but I have a little problem. How can I check the value of the tax custom field?
Currently it looks like my screenshot:
[ ![pfand01.png](/forum/attachment/60450) ](/forum/attachment/60450 "pfand01.png")

Here you can see the cart:
[ ![pfand02.png](/forum/attachment/60449) ](/forum/attachment/60449 "pfand02.png")

Problem is, that the taxes "Pfand 7% MwSt." and "Pfand 19% MwSt." are not correct calculated. The calculated tax is the complete - mixed - tax of both taxes (custom fields). My custom field for the tax is named "pfand_steuersatz". It is a simple dropdown list field in the backend.

* * *
And so that it doesn't get boring ![:-)](/media/kunena/emoticons/3.png ":-)") : The customer type must be taken into account when calculating the CustomFields tax (pfand tax). For a normal private customer, the tax for the "pfand" must be calculated; for corporate customers (i.e. those who fill in the “Company” field in the registration), no tax may be calculated for the "pfand".

I tried a condition: {address.address_company}!=="" but this doesn't work. ![;)](/media/kunena/emoticons/24.png ";)")

- [ ![pfand02.png](/forum/attachment/60449) ](/forum/attachment/60449 "pfand02.png") [ ](/forum/attachment/60449?download=1 "pfand02.png")
- [ ![pfand01.png](/forum/attachment/60450) ](/forum/attachment/60450 "pfand01.png") [ ](/forum/attachment/60450?download=1 "pfand01.png")

Last edit: 1 year 6 months ago by [Rusty](/forum/user/83085-rusty "View Rusty's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzkwOTEyOC1ib3R0bGUtZGVwb3NpdC1hbmQtYmFzZS1wcmljZS1pbmZvcm1hdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14278
-
-

1 year 6 months ago -  1 year 6 months ago [\#366737](#366737) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Bottle deposit and base price information](/forum/2-general-talk-about-hikashop/909128-bottle-deposit-and-base-price-information#366737 "Hi!  We're looking for an e-commerce solution based on Joomla. Since HikaShop is well know in the last years, I would give it a try. But there are two things I'm not sure about.  #1 Bottle deposit  I want to create an online shop for a &quot;Drinks Market&quot;. This market is based in Germany. Here you have to handle with &quot;bottle deposit&quot;. This is an additional price per product, that have to be displayed on the product listings, product details page, shopping cart, order mail and invoice.  As far as I know, HikaShop does not offer such an extension.  But maybe it can be realized with HikaShop. Would it be possible to use custom fields (for products) for deposit values? These deposit values have to be displayed &#95;and&#95; calculated as SUMMARIZED deposit value in the shopping cart (and order mail, invoice).  One example: Let's say, we have two products in the shopping cart...  product price 1 = 10,00 € deposit price 1 = 3,00 € product price 2 = 5,00 € deposit price 2 = 1,00 €  The shopping cart shows the product prices (single and summarized, as per default) and adds another line &quot;deposit&quot;, that shows the sum of all deposit prices (in the example: 4,00 €). So the final result is the summarized price of 19,00 €.  #2 Base price information  Here in germany exists a regulation for price information (&quot;Preisangabenverordnung&quot; -&gt; &quot;Price Indication Ordinance&quot; or &quot;base price&quot;). It means, that if we sell packages or goods by weight/volume/quantitiy/bulk we have to display the base price per unit.  One example: A product - let's say a water bottle - contains 0,5 l. The price is 0,90 €. On the product listing page and the product details page the following has to be displayed:  Price: 0,90 € (as usually) Content: 0,5 Litre (1,80 € / 1 Litre)  Now I try to describe the need..  For the configuration (in the backend) I would need two fields:  &#91;UNIT&#95;VALUE&#93; - in my example &quot;0,5&quot; &#91;UNIT&#95;BASE&#95;VALUE&#93; - in my example &quot;1&quot;  Now we need a little calculation for the base price per unit: &#91;BASE&#95;PRICE&#93; = &#91;ARTICLE&#95;PRICE&#93; / &#91;UNIT&#95;VALUE&#93; Now we need to display the result in the frontend - on following pages: ARTICLE&#95;LISTINGS and ARTICLE&#95;DETAIL&#95;PAGE - like this:  Content: &#91;UNIT&#95;VALUE&#93; &#91;UNIT&#93; (&#91;BASE&#95;PRICE&#93; € / &#91;UNIT&#95;BASE&#95;VALUE&#93; &#91;UNIT&#93;) ... and now with values: Content: 0.5 Litre (1,80 € &#42; / 1 Liter)  In the frontend: This information has to be displayed directly near the price information (in the html code: mainly directly after the price - with it's own css class for styling).  What do you think? Can HikaShop achive these jobs? ;)  Cheers Rusty")*

Hi,

No, you won't be able to make that dynamic.
The formula itself cannot contain conditions.
And the condition itself is global to the products of the cart. So, it can work if have only products of a similar tax category in the cart, but if you have products from different tax categories at the same time in the cart, the formula can't be applied to only some of the products, which would be needed in your case.

What you can do though is that you can use mass actions with a filter on the product_tax_id column to target the products from the different tax categories, and an action "update the values" on the custom field with the tax rate with the mode "string" and the value 0.19 or 0.07 to automatically set the tax rate in the custom field. That way, you only have to take care of the tax category, and the custom product field with the tax rate will be filled automatically so that the solution I talked about in my previous message would be feasible.
And thus, this means you only want ONE formula row for your tax calculation on pfand, which will contain the taxes on the pfand value for both 7% and 19% rates proportionally.
If you want to have two rows, that's not possible. In that case, modifying the code of the plugin to have an extra option to add taxes would be the solution, but this require extensive development in the plugin.

Similarly to the tax rate, you can use {user.xxx} where xxx is a custom field of the table "user" in the "condition" of the formula so that the formula won't be applied to the cart. However, by "company" field, I suppose that you're talking about the address_company field.
Custom address fields are not yet available for the cart fee plugin conditions/formulas. So you can't directly use the address_company field. So you'll have to make that custom user field, and then use a mass action to set that field based on the address_company field being saved. That's not ideal, because a customer can potentially have several addresses. But that's the best I can propose with what's available.

Last edit: 1 year 6 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzkwOTEyOC1ib3R0bGUtZGVwb3NpdC1hbmQtYmFzZS1wcmljZS1pbmZvcm1hdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Rusty](/forum/user/83085-rusty "View Rusty's Profile")**
- [![Rusty's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/83085-rusty "View Rusty's Profile") Topic Author
- [ Offline](/forum/user/83085-rusty)

Less More

- Posts: 105
- Thank you received: 8
-

1 year 6 months ago -  1 year 6 months ago [\#366826](#366826) by [Rusty](/forum/user/83085-rusty "View Rusty's Profile")  Replied by *[Rusty](/forum/user/83085-rusty "View Rusty's Profile")* on topic *[Bottle deposit and base price information](/forum/2-general-talk-about-hikashop/909128-bottle-deposit-and-base-price-information#366826 "Hi!  We're looking for an e-commerce solution based on Joomla. Since HikaShop is well know in the last years, I would give it a try. But there are two things I'm not sure about.  #1 Bottle deposit  I want to create an online shop for a &quot;Drinks Market&quot;. This market is based in Germany. Here you have to handle with &quot;bottle deposit&quot;. This is an additional price per product, that have to be displayed on the product listings, product details page, shopping cart, order mail and invoice.  As far as I know, HikaShop does not offer such an extension.  But maybe it can be realized with HikaShop. Would it be possible to use custom fields (for products) for deposit values? These deposit values have to be displayed &#95;and&#95; calculated as SUMMARIZED deposit value in the shopping cart (and order mail, invoice).  One example: Let's say, we have two products in the shopping cart...  product price 1 = 10,00 € deposit price 1 = 3,00 € product price 2 = 5,00 € deposit price 2 = 1,00 €  The shopping cart shows the product prices (single and summarized, as per default) and adds another line &quot;deposit&quot;, that shows the sum of all deposit prices (in the example: 4,00 €). So the final result is the summarized price of 19,00 €.  #2 Base price information  Here in germany exists a regulation for price information (&quot;Preisangabenverordnung&quot; -&gt; &quot;Price Indication Ordinance&quot; or &quot;base price&quot;). It means, that if we sell packages or goods by weight/volume/quantitiy/bulk we have to display the base price per unit.  One example: A product - let's say a water bottle - contains 0,5 l. The price is 0,90 €. On the product listing page and the product details page the following has to be displayed:  Price: 0,90 € (as usually) Content: 0,5 Litre (1,80 € / 1 Litre)  Now I try to describe the need..  For the configuration (in the backend) I would need two fields:  &#91;UNIT&#95;VALUE&#93; - in my example &quot;0,5&quot; &#91;UNIT&#95;BASE&#95;VALUE&#93; - in my example &quot;1&quot;  Now we need a little calculation for the base price per unit: &#91;BASE&#95;PRICE&#93; = &#91;ARTICLE&#95;PRICE&#93; / &#91;UNIT&#95;VALUE&#93; Now we need to display the result in the frontend - on following pages: ARTICLE&#95;LISTINGS and ARTICLE&#95;DETAIL&#95;PAGE - like this:  Content: &#91;UNIT&#95;VALUE&#93; &#91;UNIT&#93; (&#91;BASE&#95;PRICE&#93; € / &#91;UNIT&#95;BASE&#95;VALUE&#93; &#91;UNIT&#93;) ... and now with values: Content: 0.5 Litre (1,80 € &#42; / 1 Liter)  In the frontend: This information has to be displayed directly near the price information (in the html code: mainly directly after the price - with it's own css class for styling).  What do you think? Can HikaShop achive these jobs? ;)  Cheers Rusty")*

Currently we limit us to use only one tax (for all products/custom fields), so the last discussed problem is "solved" for the moment.

But I faced another issue: The custom fields (the one I use for bottle deposit) is not showing on the pdf invoice and the delivery note.

Last edit: 1 year 6 months ago by [Rusty](/forum/user/83085-rusty "View Rusty's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzkwOTEyOC1ib3R0bGUtZGVwb3NpdC1hbmQtYmFzZS1wcmljZS1pbmZvcm1hdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14278
-
-

1 year 6 months ago [\#366827](#366827) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Bottle deposit and base price information](/forum/2-general-talk-about-hikashop/909128-bottle-deposit-and-base-price-information#366827 "Hi!  We're looking for an e-commerce solution based on Joomla. Since HikaShop is well know in the last years, I would give it a try. But there are two things I'm not sure about.  #1 Bottle deposit  I want to create an online shop for a &quot;Drinks Market&quot;. This market is based in Germany. Here you have to handle with &quot;bottle deposit&quot;. This is an additional price per product, that have to be displayed on the product listings, product details page, shopping cart, order mail and invoice.  As far as I know, HikaShop does not offer such an extension.  But maybe it can be realized with HikaShop. Would it be possible to use custom fields (for products) for deposit values? These deposit values have to be displayed &#95;and&#95; calculated as SUMMARIZED deposit value in the shopping cart (and order mail, invoice).  One example: Let's say, we have two products in the shopping cart...  product price 1 = 10,00 € deposit price 1 = 3,00 € product price 2 = 5,00 € deposit price 2 = 1,00 €  The shopping cart shows the product prices (single and summarized, as per default) and adds another line &quot;deposit&quot;, that shows the sum of all deposit prices (in the example: 4,00 €). So the final result is the summarized price of 19,00 €.  #2 Base price information  Here in germany exists a regulation for price information (&quot;Preisangabenverordnung&quot; -&gt; &quot;Price Indication Ordinance&quot; or &quot;base price&quot;). It means, that if we sell packages or goods by weight/volume/quantitiy/bulk we have to display the base price per unit.  One example: A product - let's say a water bottle - contains 0,5 l. The price is 0,90 €. On the product listing page and the product details page the following has to be displayed:  Price: 0,90 € (as usually) Content: 0,5 Litre (1,80 € / 1 Litre)  Now I try to describe the need..  For the configuration (in the backend) I would need two fields:  &#91;UNIT&#95;VALUE&#93; - in my example &quot;0,5&quot; &#91;UNIT&#95;BASE&#95;VALUE&#93; - in my example &quot;1&quot;  Now we need a little calculation for the base price per unit: &#91;BASE&#95;PRICE&#93; = &#91;ARTICLE&#95;PRICE&#93; / &#91;UNIT&#95;VALUE&#93; Now we need to display the result in the frontend - on following pages: ARTICLE&#95;LISTINGS and ARTICLE&#95;DETAIL&#95;PAGE - like this:  Content: &#91;UNIT&#95;VALUE&#93; &#91;UNIT&#93; (&#91;BASE&#95;PRICE&#93; € / &#91;UNIT&#95;BASE&#95;VALUE&#93; &#91;UNIT&#93;) ... and now with values: Content: 0.5 Litre (1,80 € &#42; / 1 Liter)  In the frontend: This information has to be displayed directly near the price information (in the html code: mainly directly after the price - with it's own css class for styling).  What do you think? Can HikaShop achive these jobs? ;)  Cheers Rusty")*

Hi,

Can you provide screenshots of the settings of your custom field ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzkwOTEyOC1ib3R0bGUtZGVwb3NpdC1hbmQtYmFzZS1wcmljZS1pbmZvcm1hdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Rusty](/forum/user/83085-rusty "View Rusty's Profile")**
- [![Rusty's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/83085-rusty "View Rusty's Profile") Topic Author
- [ Offline](/forum/user/83085-rusty)

Less More

- Posts: 105
- Thank you received: 8
-

1 year 6 months ago -  1 year 6 months ago [\#366834](#366834) by [Rusty](/forum/user/83085-rusty "View Rusty's Profile")  Replied by *[Rusty](/forum/user/83085-rusty "View Rusty's Profile")* on topic *[Bottle deposit and base price information](/forum/2-general-talk-about-hikashop/909128-bottle-deposit-and-base-price-information#366834 "Hi!  We're looking for an e-commerce solution based on Joomla. Since HikaShop is well know in the last years, I would give it a try. But there are two things I'm not sure about.  #1 Bottle deposit  I want to create an online shop for a &quot;Drinks Market&quot;. This market is based in Germany. Here you have to handle with &quot;bottle deposit&quot;. This is an additional price per product, that have to be displayed on the product listings, product details page, shopping cart, order mail and invoice.  As far as I know, HikaShop does not offer such an extension.  But maybe it can be realized with HikaShop. Would it be possible to use custom fields (for products) for deposit values? These deposit values have to be displayed &#95;and&#95; calculated as SUMMARIZED deposit value in the shopping cart (and order mail, invoice).  One example: Let's say, we have two products in the shopping cart...  product price 1 = 10,00 € deposit price 1 = 3,00 € product price 2 = 5,00 € deposit price 2 = 1,00 €  The shopping cart shows the product prices (single and summarized, as per default) and adds another line &quot;deposit&quot;, that shows the sum of all deposit prices (in the example: 4,00 €). So the final result is the summarized price of 19,00 €.  #2 Base price information  Here in germany exists a regulation for price information (&quot;Preisangabenverordnung&quot; -&gt; &quot;Price Indication Ordinance&quot; or &quot;base price&quot;). It means, that if we sell packages or goods by weight/volume/quantitiy/bulk we have to display the base price per unit.  One example: A product - let's say a water bottle - contains 0,5 l. The price is 0,90 €. On the product listing page and the product details page the following has to be displayed:  Price: 0,90 € (as usually) Content: 0,5 Litre (1,80 € / 1 Litre)  Now I try to describe the need..  For the configuration (in the backend) I would need two fields:  &#91;UNIT&#95;VALUE&#93; - in my example &quot;0,5&quot; &#91;UNIT&#95;BASE&#95;VALUE&#93; - in my example &quot;1&quot;  Now we need a little calculation for the base price per unit: &#91;BASE&#95;PRICE&#93; = &#91;ARTICLE&#95;PRICE&#93; / &#91;UNIT&#95;VALUE&#93; Now we need to display the result in the frontend - on following pages: ARTICLE&#95;LISTINGS and ARTICLE&#95;DETAIL&#95;PAGE - like this:  Content: &#91;UNIT&#95;VALUE&#93; &#91;UNIT&#93; (&#91;BASE&#95;PRICE&#93; € / &#91;UNIT&#95;BASE&#95;VALUE&#93; &#91;UNIT&#93;) ... and now with values: Content: 0.5 Litre (1,80 € &#42; / 1 Liter)  In the frontend: This information has to be displayed directly near the price information (in the html code: mainly directly after the price - with it's own css class for styling).  What do you think? Can HikaShop achive these jobs? ;)  Cheers Rusty")*

Hi nicolas,

> nicolas wrote: Can you provide screenshots of the settings of your custom field ?

here it is:
[ ![Screenshot2025-04-24152032.png](/forum/attachment/60467) ](/forum/attachment/60467 "...4-24152032.png")

And here a screenshot from an invoice:
[ ![Screenshot2025-04-24171743.png](/forum/attachment/60470) ](/forum/attachment/60470 "...4-24171743.png")

Here you can "see" the missing custom fields ("pfand" and "pfand_tax"). And ... btw. ... the total sum (Summe) makes no sense. ![;-)](/media/kunena/emoticons/24.png ";-)")

* * *

P.S. I tested further and found a special behaviour:

If one of the custom fields are used as tax field (as I do), then the cart can not calculate the tax correctly as "total tax". Both - all products - and the custom field are configured with a tax of "19%". I wanted the cart (invoice, mail etc.) to only show one tax row. For this purpose we have to summarize the total product tax and the total custom field tax - and show THIS total tax in the tax row. But I can not achive this. The tax from the custom fields are ignored.

- [ ![Screenshot2025-04-24152032.png](/forum/attachment/60467) ](/forum/attachment/60467 "...4-24152032.png") [ ](/forum/attachment/60467?download=1 "...4-24152032.png")
- [ ![Screenshot2025-04-24171743.png](/forum/attachment/60470) ](/forum/attachment/60470 "...4-24171743.png") [ ](/forum/attachment/60470?download=1 "...4-24171743.png")

Last edit: 1 year 6 months ago by [Rusty](/forum/user/83085-rusty "View Rusty's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzkwOTEyOC1ib3R0bGUtZGVwb3NpdC1hbmQtYmFzZS1wcmljZS1pbmZvcm1hdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.139 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
