IF = Product cat
-
Hi,
I am trying to add different formulas to VARIABLE products based on their product categories and attributes. I have got the attributes working, but can’t seem to get the categories.
I use the following code:
[if_product_taxonomy taxonomy=”product_cat” slug=”edition-10″]***[/if_product_taxonomy]
and have also tried this:
[if_product_category slug=”edition-10″]****[/if_product_category]
What I’d like to achieve is to check
-> if in cat ‘XX’ then ->
-> if in cat ‘YY’ then ->
-> if in cat ‘ZZ’ then ->Each product is categorised in multiple categories, but never more than one of these three.
What am I doing wrong?
What am I missing?Best,
Stijn van der Pol
See code below:
( 0 [if_value value="{product_attr attribute='size'}" compare_operator="equal" compare_to_value="A3 (29.7*42cm)"]+50[/if_value] [if_value value="{product_attr attribute='size'}" compare_operator="equal" compare_to_value="A2 (42*59.4cm)"]+60[/if_value] [if_value value="{product_attr attribute='size'}" compare_operator="equal" compare_to_value="A1 (59.4*84.1cm)"]+70[/if_value] + ( ( 1 [if_product_taxonomy taxonomy="product_cat" slug="open-edition"]*1[/if_product_taxonomy] [if_product_taxonomy taxonomy="product_cat" slug="edition-100"]*2[/if_product_taxonomy] [if_product_taxonomy taxonomy="product_cat" slug="edition-25"]*3[/if_product_taxonomy] [if_product_taxonomy taxonomy="product_cat" slug="edition-10"]*4[/if_product_taxonomy] ) * ( (1 [if_value value="{product_attr attribute='size'}" compare_operator="equal" compare_to_value="A3 (29.7*42cm)"]*50[/if_value] [if_value value="{product_attr attribute='size'}" compare_operator="equal" compare_to_value="A2 (42*59.4cm)"]*70[/if_value] [if_value value="{product_attr attribute='size'}" compare_operator="equal" compare_to_value="A1 (59.4*84.1cm)"]*100[/if_value] ) + (((x*x) /25) * ( (1 [if_value value="{product_attr attribute='size'}" compare_operator="equal" compare_to_value="A3 (29.7*42cm)"]*(100-50)[/if_value] [if_value value="{product_attr attribute='size'}" compare_operator="equal" compare_to_value="A2 (42*59.4cm)"]*(140-70)[/if_value] [if_value value="{product_attr attribute='size'}" compare_operator="equal" compare_to_value="A1 (59.4*84.1cm)"]*(200-100)[/if_value] ) )) ) ) + ( (1 [if_product_taxonomy taxonomy="product_cat" slug="open-edition"]*1[/if_product_taxonomy] [if_product_taxonomy taxonomy="product_cat" slug="edition-100"]*1.3[/if_product_taxonomy] [if_product_taxonomy taxonomy="product_cat" slug="edition-25"]*1.6[/if_product_taxonomy] [if_product_taxonomy taxonomy="product_cat" slug="edition-10"]*2[/if_product_taxonomy] ) * ( ( (1 [if_product_taxonomy taxonomy="product_cat" slug="open-edition"]*1[/if_product_taxonomy] [if_product_taxonomy taxonomy="product_cat" slug="edition-100"]*2[/if_product_taxonomy] [if_product_taxonomy taxonomy="product_cat" slug="edition-25"]*3[/if_product_taxonomy] [if_product_taxonomy taxonomy="product_cat" slug="edition-10"]*4[/if_product_taxonomy] ) * ( (1 [if_value value="{product_attr attribute='size'}" compare_operator="equal" compare_to_value="A3 (29.7*42cm)"]*50[/if_value] [if_value value="{product_attr attribute='size'}" compare_operator="equal" compare_to_value="A2 (42*59.4cm)"]*70[/if_value] [if_value value="{product_attr attribute='size'}" compare_operator="equal" compare_to_value="A1 (59.4*84.1cm)"]*100[/if_value] ) + (((x*x) /25) * ( (1 [if_value value="{product_attr attribute='size'}" compare_operator="equal" compare_to_value="A3 (29.7*42cm)"]*(100-50)[/if_value] [if_value value="{product_attr attribute='size'}" compare_operator="equal" compare_to_value="A2 (42*59.4cm)"]*(140-70)[/if_value] [if_value value="{product_attr attribute='size'}" compare_operator="equal" compare_to_value="A1 (59.4*84.1cm)"]*(200-100)[/if_value] ) )) ) ) *1.025) ) ) *1.19
- The topic ‘IF = Product cat’ is closed to new replies.