Zen Cart Logo
Forums / Bug Reports / [Done v139] Sale Maker listing sort by price

[Done v139] Sale Maker listing sort by price

Locked

Views: 2,132

Results 1 to 16 of 16
This thread is locked. New replies are disabled.
29 Mar 2010, 5:33 PM
#1
damiantaylor avatar

damiantaylor

Zen Follower

Join Date:
Aug 2009
Posts:
244
Plugin Contributions:
0

[Done v139] Sale Maker listing sort by price

I think I have found a bug when the Sale Maker is in effect.
I have tested a 50% discount across my whole catalogue.
When I list all products and try to sort the list by price, it doesn't work correctly because the 'order by' in the SQL SELECT statement is using 'products_price_sorter' from the products table, but they are all set at zero except for any items I already had on special.
Should using the Sale Maker populate this field in the products table?

Apologies if this question has already been asked; I can't search this forum for some reason. Probably because I'm using IE!

I'm running Zen Cart 1.3.8a

29 Mar 2010, 6:53 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: [Done v139] Sale Maker listing sort by price

I would make sure that all of your Products have a master_categories_id set on them ...

Then, I would check that you have applied the Known Bug Fixes at:
http://www.zen-cart.com/forum/showthread.php?t=82619

NOTE: this is also a good time to ensure that you have added all of the Security Updates and Patches:
http://www.zen-cart.com/forum/showthread.php?t=131115

29 Mar 2010, 7:00 PM
#3
damiantaylor avatar

damiantaylor

Zen Follower

Join Date:
Aug 2009
Posts:
244
Plugin Contributions:
0

Re: [Done v139] Sale Maker listing sort by price

Thanks Linda,
I'll have a look at that bug fix and report back.
I've installed most of the security patches already but haven't checked if there are any new ones for a month or so, so I'll take a look at them too.
Thanks for reminding me :D

30 Mar 2010, 4:00 PM
#4
damiantaylor avatar

damiantaylor

Zen Follower

Join Date:
Aug 2009
Posts:
244
Plugin Contributions:
0

Re: [Done v139] Sale Maker listing sort by price

Hi Linda,
I've checked and all my products have a master category id,
I'm up to date with all the security patches and I can't see any bug fix related to my problem.
The closest one is 'Sales made with Salemaker having trouble on some sales with Linked Products' but that doen't really describe my issue.

Am I right in thinking that applying a sale should populate the products_price_sorter column in the products table?

30 Mar 2010, 4:31 PM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: [Done v139] Sale Maker listing sort by price

Yes it does for all Products that match the Sale ...

If you have set the Sale on the whole catalog ... you should see the products_price_sorter field update with the new prices ...

What are your settings on the Sale? and does it have the RED dot or the GREEN dot on it?

30 Mar 2010, 5:13 PM
#6
damiantaylor avatar

damiantaylor

Zen Follower

Join Date:
Aug 2009
Posts:
244
Plugin Contributions:
0

Re: [Done v139] Sale Maker listing sort by price

Hi Linda,
I have deduction set at 50 percent
Price range 0 to 0
Start date is blank
End date is blank

Sale is applied to entire catalogue.
Green dot is on and prices are reflected in the catalogue.

I've tried applying the sale to just one category, entering a start and end date and a from and to price but nothing seems to work.
The products_price_sorter is still 0 on my products table.

Is there anything else I can check?
If you can point me at which php file should be doing the update I'll have a look and see if I can see what the problem is.

30 Mar 2010, 5:32 PM
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: [Done v139] Sale Maker listing sort by price

What is the setting for:
Specials Condition: Apply SaleDeduction to Specials Price - Otherwise Apply to Price

That is what I am using ...

30 Mar 2010, 5:43 PM
#8
damiantaylor avatar

damiantaylor

Zen Follower

Join Date:
Aug 2009
Posts:
244
Plugin Contributions:
0

Re: [Done v139] Sale Maker listing sort by price

I tried all 3 and got nothing.

I've just been debugging 'zen_update_salemaker_product_prices' in admin/includes/functions/general.php.

The first select statement is:
select sale_categories_selected from zen_salemaker_sales where sale_id = '3'

...which returns 1 row. The problem is column sale_categories_selected = NULL so the update loop doesn't fire.

Any idea why sale_categories_selected = NULL in my table?

30 Mar 2010, 5:50 PM
#9
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: [Done v139] Sale Maker listing sort by price

And you are sure that you have the first box checked for Entire Catalog?

30 Mar 2010, 5:53 PM
#10
damiantaylor avatar

damiantaylor

Zen Follower

Join Date:
Aug 2009
Posts:
244
Plugin Contributions:
0

Re: [Done v139] Sale Maker listing sort by price

Yeah, It's checked.
I've tried switching the sale off and back on with the green/red dot too.

Here's my admin/salemaker.php header:

/**
 * @package admin
 * @copyright Copyright 2003-2007 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: salemaker.php 6369 2007-05-25 03:03:42Z ajeh $
 */

Is that the same as yours?

30 Mar 2010, 6:07 PM
#11
damiantaylor avatar

damiantaylor

Zen Follower

Join Date:
Aug 2009
Posts:
244
Plugin Contributions:
0

Re: [Done v139] Sale Maker listing sort by price

I'm going to have to leave this until tomorrow.
Thanks for your help so far Linda!

30 Mar 2010, 6:11 PM
#12
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: [Done v139] Sale Maker listing sort by price

Same code ...

When you have time, peek in phpMyAdmin at the salemaker_sales table and see what information is stored in each field for this record ...

31 Mar 2010, 5:41 PM
#13
damiantaylor avatar

damiantaylor

Zen Follower

Join Date:
Aug 2009
Posts:
244
Plugin Contributions:
0

Re: [Done v139] Sale Maker listing sort by price

I've found it :clap:
The product I was testing is priced by attribute because I prefer how it looks with the actual prices in the dropdown on the product info page rather than +x.xx.

Because it is priced by attribute there is no price in products.products_price therefore no discounted price in products.products_price_sorter.

Would you call this a bug or a feature? :D
If it's a bug, do you know of a fix?

Thanks for all your help Linda, I'm glad we managed to get to the bottom of it!

31 Mar 2010, 5:46 PM
#14
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: [Done v139] Sale Maker listing sort by price

Have you reset all the products_price_sorter records by using the option for that in Admin->Tools->Store Manager?
(Might want to do a database backup first).

31 Mar 2010, 6:30 PM
#15
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: [Done v139] Sale Maker listing sort by price

Even Priced by Attribute products have a products_price_sorter value ... :unsure:

31 Mar 2010, 6:42 PM
#16
damiantaylor avatar

damiantaylor

Zen Follower

Join Date:
Aug 2009
Posts:
244
Plugin Contributions:
0

Re: [Done v139] Sale Maker listing sort by price

Yay DrByte you're a genius! :clap:
It must've got it's knickers in a twist somewhere because after pressing the restet button I now have the sorter price correctly populated and all is ok :)

Thank you both so much for your help!