Jump to content

Different labels for different minimal quantity discount


nicola10

Recommended Posts

Hello everybody

I'm trying to make a modify to product-list.tpl to show different label based on different quantity discount, using PS 1.7.6

I set two different catalague rules: the first rule applies a discount from 1 unit and the second rule applies a discount form 2 unit

For the first rule (minimal quantity = 1 unit)  I'm trying to show the label "Special Offers" for each product on product list under this rule

For the second rule (minimal quantity > 1 unit)  I'm trying to show the label "Discoun based on quantity" for each product on product list under this rule

	      {if $product.discount_type === 'percentage'}
        <span>{if (isset($product.quantity_discounts) && count($product.quantity_discounts) != 1)}{l s='Special Offers' d='Shop.Theme.Catalog'}{/if}</span> <!-- This works -->
      {elseif $product.discount_type === 'amount'}
        <span>{if (isset($product.quantity_discounts) && count($product.quantity_discounts) != 1)}{l s='Special Offers' d='Shop.Theme.Catalog'}{/if}</span> <!-- This works -->
      {elseif $product.discount_type === 'percentage'}
        <span>{if (isset($product.quantity_discounts) && ($quantity_discount.quantity) > 1)}{l s='Discoun based on quantity' d='Shop.Theme.Catalog'}{/if}</span> <!-- This doesn't works -->
      {elseif $product.discount_type === 'amount'}
        <span>{if (isset($product.quantity_discounts) && ($quantity_discount.quantity) > 1)}{l s='Discoun based on quantity' d='Shop.Theme.Catalog'}{/if}</span> <!-- This doesn't works -->
      {/if}
	

No error display on the page

 

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...