EXTREMELY IMPORTANT - Catalog Promotions Bug - 2.08

I just submitted this bug to the tracker, but it is significantly serious and warrants reposting here.



If you use catalog promotional discounts, your discounts may multiply as you edit products.



I discovered a bug as I was modifying product descriptions today - when promotions apply, the promotional prices are getting saved into product descriptions as I work.



For example, say you have a product that starts at $24.95 - Retail price and price fields are both $24.95.



Say you create a catalog promotion that allows all books to be 10% off. This includes the $24.95 item.



When you load the product modification page on the back-end, you will see the discounted price in the price field on the page - $22.45.



Say you make a few changes and save the page. Now view the list of products in that category on the product tab. You will discover that the promotion has been applied AGAIN to the product you just worked on - it is now 10% of $22.45 or $20.21.



The customers now see ‘Regular price: $22.45, Price: $20.21 -10%’ but it is not accurate. They are actually getting DOUBLE the discount.



Because this is a problem that could easily slip by you in your workflow (I have to go back for example, and re-edit all of my pricing for the products I edited today) I hope you will heed this warning and make sure that the Price on the modification screen is the retail price when you save if you are using catalog discount promotions.

I’ve tried to duplicate the issue as you’ve described and I cannot get it to occur. I have products with 25% off as a catalog promotion and my price field still shows the non-discounted original price as does the Suggested Retail price field. When I look at the product in my store, the discount is applied correctly with the original price indicated as “Original Price” and the discount price appearing as 25% off the original in my Price field. The back-end looks just fine, though.



Is there any more detail you can provide as far as the type of Catalog promotion you have set up?



Regards,

Stephanie

www.Products4Pets.com (in process of switching over to CS-Cart 2.0.8)

Thanks, for trying. I am a little ticked - the behavior on the demo cart is as you describe. Did you install from 2.0.8 or did you upgrade from a previous version?



I guess I will have to go through and diff compare again between my upgrade to 2.0.8 and the vanilla distribution. Not happy with this.

[quote name=‘jagorny’]Thanks, for trying. I am a little ticked - the behavior on the demo cart is as you describe. Did you install from 2.0.8 or did you upgrade from a previous version?



I guess I will have to go through and diff compare again between my upgrade to 2.0.8 and the vanilla distribution. Not happy with this.[/quote]



Once you do the database diff between vanilla 2.0.8 & upgrades to 2.0.8 you’ll laugh :stuck_out_tongue:

I upgraded from 2.0.4 but I didn’t really have much in the database at the time of upgrade because I just purchased CS-Cart recently and am in the process of setting it up. I’ve had some minor issues but nothing major like many people have posted with their upgrades.



Regards,

Stephanie

[quote name=‘JesseLeeStringer’]Once you do the database diff between vanilla 2.0.8 & upgrades to 2.0.8 you’ll laugh :p[/QUOTE]



Ahhh baloney. That’s just not right!



My intuition is that a mod that I made to the admin side has changed the way that the admin cart operates… but I have asked CS-Cart techs to confirm.



Basically I am loading the extended product information on the backend so that I have access to the thumbnail for the product - but my sense is that this allows the promotional price to override the regular one - and that it does this for the sake of the ‘Add Order’ functionality on the back-end, so I am wary of tweaking the function. I am looking now to see if the function itself allows for just certain parameters (like image pair) to be loaded, or if there is a better function to do what I want that calling the get extra product info function.



If any coders out there have some insight or suggestions on this, please let me know. I guess the good news is that this may not be a problem for other people unless they have done a similar tweak to get thumbnails to appear on the back-end product listing pages.

For the record, this was the problem:



function fn_gather_additional_product_data(&$product, $get_icon = false, $get_detailed = false, $get_options = true, $get_discounts = true, $get_features = false)



I had only set the product[id] and first parameter to true - I did not run a negate on $get_discounts.