If this is your first visit, check our documentation. To post, register or login.
Forums / Code Matters / Bug Reports / [Done v139] Sale Maker listing sort by price

[Done v139] Sale Maker listing sort by price

Locked

Started by damiantaylor on 29 Mar 2010, 5:33 PM · 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

Post #1 by damiantaylor

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

Post #2 by ajeh

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

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

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

damiantaylor

Zen Follower

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

Post #3 by damiantaylor

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

Post #4 by damiantaylor

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

Post #5 by ajeh

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?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

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

damiantaylor

Zen Follower

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

Post #6 by damiantaylor

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

Post #7 by ajeh

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

That is what I am using ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

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

damiantaylor

Zen Follower

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

Post #8 by damiantaylor

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

Post #9 by ajeh

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

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

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

damiantaylor

Zen Follower

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

Post #10 by damiantaylor

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:11 PM
#12
ajeh avatar

ajeh

Oba-san

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

Post #12 by ajeh

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 ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

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

damiantaylor

Zen Follower

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

Post #13 by damiantaylor

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,512
Plugin Contributions:
176

Post #14 by drbyte

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).

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

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

ajeh

Oba-san

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

Post #15 by ajeh

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

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

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

damiantaylor

Zen Follower

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

Post #16 by damiantaylor

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!