1

I'm trying to use stash withing Expresso Store modifiers

 {exp:stash:set_list name="price_list"}
 {exp:store:product entry_id="{entry_id}" disable_form="yes" disable_javascript="yes"}
    {modifiers}
        {modifier_options}
            {if price_mod_val}{stash:item_price}{price_mod_val}{/stash:item_price}{/if}
        {/modifier_options}
    {/modifiers}
 {/exp:store:product}
{/exp:stash:set_list}   

but unfortunately I'm getting item_price as {price_mod_val} text instead price value

What kind of tags order suppose to be in that case?

Thanks

  • So you want the formatted value instead of unformatted? If so then use {price_mod} instead of {price_mod_val}. – Ian Apr 7 '14 at 21:11
  • Well - my issue is that {price_mod_val} tag is not translated - just comes as is as a string/text :) – JackTheKnife Apr 7 '14 at 21:20
  • Ah I see. In that case I'd probably look to move the Stash stash:set_list tag inside of the store:product tag and then add parse_depth="3". – Ian Apr 7 '14 at 21:42
  • OK. Got it to work. Answer posted below – JackTheKnife Apr 7 '14 at 21:56
1

Thanks to Ian to put me on proper path to solve my issue. Working code below:

 {exp:stash:set_list name="price_list" parse_tags="yes" parse_depth="3" parse_conditionals="yes"}
 {exp:store:product entry_id="{entry_id}" disable_form="yes" disable_javascript="yes"}
    {modifiers}
        {modifier_options}
            {if price_mod_val}{stash:item_price}{price_mod_val}{/stash:item_price}{/if}
        {/modifier_options}
    {/modifiers}
 {/exp:store:product}
{/exp:stash:set_list}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.