Forum

Thread tagged as: Problem, Error, Shop

Shop Promo Code for Category Applying to Everything

I have created a promotion and set it to trigger a 30% discount on items in a specific shop category when a code is entered. For some reason, the code is applying to any item placed into the cart with the code active. I'm not sure what is going on - I even created a new category and placed the products into that, no dice.

    Perch Runway: 3.1.1, PHP: 7.0.30, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: b5c5906d452ec590732a93b051f3827e02749b83 $, with PDO
    Server OS: Linux, cgi-fcgi
    Installed apps: content (3.1.1), assets (3.1.1), categories (3.1.1), perch_blog (5.6.1), perch_events (1.9.5), perch_forms (1.11), perch_shop_orders (1.2.6), perch_shop_products (1.2.6), perch_shop (1.2.6), perch_comments (1.2.1), perch_members (1.6.4), pipit_catalog (1.2.1), perch_mailchimp (3.1)
    App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', 'perch_events', 'perch_members', 'perch_shop', 'perch_comments', 'perch_forms', 'perch_mailchimp', ); ?>
    PERCH_LOGINPATH: /admin
    PERCH_PATH: /home/interfit/interfitphoto.com/admin
    PERCH_CORE: /home/interfit/interfitphoto.com/admin/core
    PERCH_RESFILEPATH: /home/interfit/interfitphoto.com/admin/resources
    Image manipulation: GD Imagick
    PHP limits: Max upload 100M, Max POST 105M, Memory: 128M, Total max file upload: 100M
    F1: 3b606135b33e6a102526838f4152a807
    Resource folder writeable: Yes
    SCRIPT_NAME: /admin/core/settings/diagnostics/index.php
    REQUEST_URI: /admin/core/settings/diagnostics/
    DOCUMENT_ROOT: /home/interfit/interfitphoto.com
    HTTP_HOST: www.interfitphoto.com
Kevin Wolff

Kevin Wolff 0 points

  • 2 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

What does debug output when you display the cart?

SELECT * FROM perch3_shop_promotions WHERE promoFrom<='2018-10-13 01:19:00' AND promoTo>'2018-10-13 01:19:00' AND promoActive=1 AND promoDeleted IS NULL ORDER BY promoOrder ASC
Promo (Megan Allen) skipped: discount code not applied.
Promo (Damien Noble Andrews) skipped: discount code not applied.
Promo (Chopstick Guys) skipped: discount code not applied.
Promo (John Cornicello) skipped: discount code not applied.
Promo (Daniel Schenkelberg) skipped: discount code not applied.
Promo (Jason Duchow) skipped: discount code not applied.
Promo (Allison Earnest) skipped: discount code not applied.
Promo (Joe Edelman) skipped: discount code not applied.
Promo (Jennifer Emery) skipped: discount code not applied.
Promo (Dave Hakamaki) skipped: discount code not applied.
Promo (Jason & Joanne Marino) skipped: discount code not applied.
Promo (Model Network) skipped: discount code not applied.
Promo (Jennifer Rapoza) skipped: discount code not applied.
Promo (Brett Seeley) skipped: discount code not applied.
Promo (Ty Alexander) skipped: discount code not applied.
Promo (Robert Trawick) skipped: discount code not applied.
Promo (Ray Quezada) skipped: discount code not applied.
Promo (Austin Henry Wallace) skipped: discount code not applied.
Promo (Carla Sawyers) skipped: discount code not applied.
Promo (Deep S1 Cut) qualifies!
Percentage discount promo
UPDATE perch3_shop_cart SET cartTotalItems='1', cartTotalProducts='1', cartTotalWithTax='19.09', cartTotalWithoutTax='13.89' WHERE cartID='131164'
[1] SELECT * FROM perch3_shop_products WHERE productID=32 AND productDeleted IS NULL LIMIT 1
UPDATE perch3_shop_cart_items SET itemQty=1 WHERE cartID='131164' AND productID=32

I've been scrubbing through the settings and the debug console to no avail - not sure why this is qualifying for literally every product instead of the category I set.

Hi Kevin

I logged a similar issue a year ago. It's not fixed as far as I know – Shop hasn't had an update since then sadly.

https://forum.grabaperch.com/forum/11-10-2017-shop-promotions-limited-to-category

Jon

Drew McLellan

Drew McLellan 2638 points
Perch Support

I think this could be a bug where the category filtering only applies to the "use sale price" promos.

Drew McLellan said:

I think this could be a bug where the category filtering only applies to the "use sale price" promos.

Yeah, I can confirm that now - you and Jon found the issue. It's also affecting my ability to run site-wide sales.

Drew McLellan

Drew McLellan 2638 points
Perch Support

It's also affecting my ability to run site-wide sales.

How so? That doesn't sound like the same thing

Drew McLellan said:

It's also affecting my ability to run site-wide sales.

How so? That doesn't sound like the same thing

Ah, it's not - the discounted price is just only showing up in the cart and not the price of the item. Is there a way to get the status of whether there's a sale running or not so I can alter the product template price theming?

Drew McLellan

Drew McLellan 2638 points
Perch Support

I don't think so, other than reading the value of the discounts.

I'm sure you and Rachel are quite busy with updates and other projects, but is there a possibility of an update for this bug within the year? Fourth quarter sales are especially important and our company would be willing to pay for dev costs to fix the error so we can run holiday sales on categories of products.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, it's already fixed and queued up to be released.