How to Dynamically Discount Prices based on Product Title or Other Attribute?

Case:

There are products for Men, Women, and Baby. We offer a 20% discount on products having title Men and a 10% discount on products having title Women. Other products will be the same.

Solution:

Step 1: We are going to create a dynamic price with a 20% discount for Men.

Go to CTX Feed -> Dynamic Attributes menu on Dashboard. Click Add New button. In the Dynamic Attribute, input field write a name for this Attribute. Note: Do not use any special character in Attribute Name.

For example, we call it Discount for Men. Then, click on the Add Condition button. Then a new row appears to declare your discount.

At the Attribute select option, choose the Price. Then, select the greater than option from Condition. It will be greater than 0. Then select pattern as the output type. Its value is -20%.

Then select Price as the default attribute.

Save this dynamic attribute.

Step 2: We are going to create a dynamic price with a 10% discount for Women.

Go to CTX Feed -> Dynamic Attributes menu on Dashboard. Click Add New button. In the Dynamic Attribute input field, write a name for this Attribute. For example, we call it Discount for Women. Then, click on the Add Condition button. Then a new row appears to declare your discount.

At the Attribute select option, choose the Price. Then, select the greater than option from Condition. It will be greater than 0. Then select pattern as the output type. Its value is -10%.

Then select Price as the default attribute.

Save this dynamic attribute.

Final Step: Finally, we create a dynamic attribute for modifying the price in feed.

Go to CTX Feed -> Dynamic Attributes menu on Dashboard. Click Add New button. In the Dynamic Attribute input field write a name for this Attribute.

For example, we name it Discount for Men and Women.

Then, click on the Add Condition button. Then a new row appears to declare your discount.

  1. At the attribute select option, choose the Title.
  2. Then, select the contains from the Condition selection option.
  3. This condition value is Men.
  4. Then, the output type is Attribute. This is default selected.
  5. Then, choose the Discount for Men attribute from the value section list.

Then, click on the Add Condition button. Then a new row appears to declare your discount.

  1. At the attribute select option, choose the Title
  2. Then, select the contains from the Condition selection option.
  3. This condition value is Women.
  4. Then, the output type is Attribute. This is default selected.
  5. Then, choose the Discount for Women attribute from the value section list.

Then select Price as the default attribute.

Save this dynamic attribute.

Lastly, make a feed with the output value as Discount for Men and Women

The generated feed is

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.