I would like to add a product with combinations to the catalog and I find the pricing settings confusing.
I'm doing this:
1. Create new product
2. In the Prices tab I set Unit price (tax excl.)0 per g (I assign g to the unit field)
3. Add a combination with Impact on unit price increase of 5
4. Add a combination with Impact on unit price increase of 10
With this setup, the unit price is not displayed in the product page.
I looked at product.tpl and I see this smarty line:
I am guessing that !empty($product->unity) evaluates to true, because I assigned a unit
$product->unit_price_ratio > 0.000000 evaluates to false because the base ratio remains 0
My understanding, as somebody who is new to thirty bees and does not know anything of smarty, is that the && evaluates to false and it is not re-evaluated when the default combination is automatically selected thus the unit price is never shown. Am I correct in this assumption? Why is the "$product->unit_price_ratio > 0.000000" in the condition?
Am I setting up prices in a way that shouldn't be done? I think thirty bees expects the base price to be set and then combinations used to modify the base price, but calculating prices that way is not very straight-forward.
P.S. Where can I find a list of all thirty bees variables that can be passed to smarty?
$productPrice is divided by $product->unit_price_ratio and the result is given to the variable unit_price (where is this declared?) which is displayed in the paragraph tag.
$product->unit_price_ratio must be 0 according to my settings above, but it also should be 5 for the first and default combination. This makes no sense, why would the product price be divided by the unit price? But then what is $product->unit_price_ratio?
What variable am I manipulating in the backoffice when I assign the 0 in the Unit price (tax excl.) setting in the Prices tab?
Question
Jeffrey de Bruijn
Hi again, I am still learning:
I would like to add a product with combinations to the catalog and I find the pricing settings confusing.
I'm doing this:
1. Create new product
2. In the Prices tab I set Unit price (tax excl.) 0 per g (I assign g to the unit field)
3. Add a combination with Impact on unit price increase of 5
4. Add a combination with Impact on unit price increase of 10
With this setup, the unit price is not displayed in the product page.
I looked at product.tpl and I see this smarty line:
{if !empty($product->unity) && $product->unit_price_ratio > 0.000000}
I am guessing that !empty($product->unity) evaluates to true, because I assigned a unit
$product->unit_price_ratio > 0.000000 evaluates to false because the base ratio remains 0
My understanding, as somebody who is new to thirty bees and does not know anything of smarty, is that the && evaluates to false and it is not re-evaluated when the default combination is automatically selected thus the unit price is never shown. Am I correct in this assumption? Why is the "$product->unit_price_ratio > 0.000000" in the condition?
Am I setting up prices in a way that shouldn't be done? I think thirty bees expects the base price to be set and then combinations used to modify the base price, but calculating prices that way is not very straight-forward.
P.S. Where can I find a list of all thirty bees variables that can be passed to smarty?
EDIT:
I was wrong and I am even more confused: changing
{if !empty($product->unity) && $product->unit_price_ratio > 0.000000}
to
{if !empty($product->unity)}
Does not make a difference, the unit price is still not displayed when the "base" unit price in the prices tab is set to 0 per g.
The complete if statement in product.tpl is the following:
$productPrice is divided by $product->unit_price_ratio and the result is given to the variable unit_price (where is this declared?) which is displayed in the paragraph tag.
$product->unit_price_ratio must be 0 according to my settings above, but it also should be 5 for the first and default combination. This makes no sense, why would the product price be divided by the unit price? But then what is $product->unit_price_ratio?
What variable am I manipulating in the backoffice when I assign the 0 in the Unit price (tax excl.) setting in the Prices tab?
Edited by Jeffrey de BruijnMy brain boom
0 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now