1

Is there a way of accessing other sale information (other than the sale_price) in the template? I'd like to be able to display the sale name that the discount relates to...!

0

Assuming you are using a version of Store greater then 2.1 you would be able to use the {adjustments} tag pair to loop through all discounts and adjustments to your order. Something along the lines of:

{adjustments}
    <tr>
        <td>{adjustment:name}</td>
        <td>{adjustment:amount}</td>
    </tr>
{/adjustments}

You can see all of the available tags within the adjustments loop here in the docs.

  • I think this only applies to the checkout tag though; if I want to show a different price and attribute it to a particular sale witihin the exp:store:product tag I don't think I can access the adjustments tag. This is really infuriating, I just want a way to offer different prices to members and state this wherever I want to promote it. "Full price 6.99 / Member price 5.99" - that kind of thing. I get the feeling I should have stuck with Cartthrob. – BellamyStudio May 8 '15 at 8:22
0

I think you'll be able to solve this with product modifieres:

{modifier_options}
    <option value="{option_id}">
       {option_name}
       {if price_mod_inc_tax_val} ({price_mod_inc_tax}) {/if}
    </option>
{/modifier_options}

option_name could be Member price, you'd have to make the modifier price -1.00 for the calculation to be correct.

You could also check the sale tag. You can limit a sale to member group so that seems like something that would be useful for your use case.

  • I've tried the sale tag and it would be perfect if I could access the sale name - that way I could set up a sale called 'member price' and make it available to members. Actually even that's not perfect because non-logged in users won't see it. I'll try the modifiers! Thanks Jannermans. – BellamyStudio May 8 '15 at 8:36
  • Hmm - I can display the modifier correctly, so that's good. But how do I make it only actually available to a logged-in member? I want to display it to everyone but only give the member the benefit. And it can't be a selectable option, it has to be the only option - you either pay full price or the member price. Tricky, or easy? (Thinking ahead as well, what happens if I have more modifiers that have nothing to do with membership?). – BellamyStudio May 8 '15 at 8:48
  • That's why the sales option is probably better, since that already takes care of all the member checks for you. It's not in the docs but have you tried sale_id, sale_title, etc? – Jan Henckens May 8 '15 at 9:11
  • {sale_id}, {sale_title}, {sale_name} - none of these get parsed and just output as they are, so I guess they're not in the docs because they're not intended to work! – BellamyStudio May 8 '15 at 9:32

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.