• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Promo Code Script for Single Item Not Entire Cart

Promo Code Script for Single Item Not Entire Cart 7 years 1 month ago #36553

I have a working promo code on my site; however, it discounts all items in the cart instead of just the item it is meant to affect. If a user selects 10 dance classes, it provides a 15% discount. The trouble is if a user selects 10 jazz dance classes and 5 additional hip-hop classes, the discount is applied to all 15 classes and this is not desired. How do I edit the code to only discount the item that has 10 or more purchases?
if ($_POST['form']['Promo'] == 'PROMO' && $_POST['form']['Jazz'][0] >= '10' || $_POST['form']['Hip-Hop'][0] >= '10' || $_POST['form']['Modern'][0] >= '10') {
  $paypal = RSFormProPayPal::getInstance();
  $paypal->args['discount_rate'] = 15;
}
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!