| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
New "Quantity" sorting rule | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
New "Quantity" sorting rule
Here is a custom modification for xcart 4.1.3 to add a Quantity sorting so that your products out of stock or low quantity can be shown last or 1st, which ever you want.
2 files to change and a sql patch products.php include/search.php With the include/search.php find: Code:
And replace with: Code:
With the products.php find: Code:
Replace with: Code:
Apply the SQL changes (Open the Patch/Upgrade page in admin area and select the patch.sql from the archive for the "Apply SQL patch" section). Code:
Thats it.
__________________
Apache/2.0.55 (Red Hat) & MYSQL Server: 5.0.24 PERL: 5.008005 / PHP: 4.4.4 - 4.3.1 X-CART Shop carts at http://www.nightscene.co.uk/shop/home.php http://www.theshisha.net/shopcart/home.php http://www.system-maintenance.com/maint/home.php http://www.tabac4u.com |
|||||||||
#2
|
|||||||
|
|||||||
Re: New "Quantity" sorting rule
This is a great mod and works perfectly for the search function. How could I get the same sort functionality for a regular product list page?
__________________
X-cart Version: 4.1.3 PHP Version: 5.1.6 MySQL: 3.23.58 OS: Linux |
|||||||
#3
|
|||||||
|
|||||||
Re: New "Quantity" sorting rule
I'm having this problem with a 4.0.19 site. Is there an equivalent mod for this version?
Cheers
__________________
Quiet please... I'm trying to unscramble my brian. http://lizzybug.co.uk (live, minor mods, 4.0.15) EZCheckout/EZUpsell (Must have mods!) Firetank's Featured Products Manager, and loads of little mods off the forum (thanks all!) http://www.jellybeangifts.co.uk (live, 4.0.18 ) Fancy Cats + custom colour mod |
|||||||
#4
|
|||||||||
|
|||||||||
Re: New "Quantity" sorting rule
Here is a custom modification for xcart 4.1.9 to add a Quantity sorting so that your products out of stock or low quantity can be shown last.
2 files to change and a sql patch products.php include/search.php With the include/search.php find: Code:
And replace all the code with: Code:
With the products.php find: Code:
And replace the full code with: Code:
Apply the SQL changes (Open the Patch/Upgrade page in admin area and select the patch.sql from the archive for the "Apply SQL patch" section). Code:
You can see this working at http://www.shishapipe.net/shopcart/home.php?cat=280 - You will see the products i have a lot of stock shows first then at the end are the out of stock products.
__________________
Apache/2.0.55 (Red Hat) & MYSQL Server: 5.0.24 PERL: 5.008005 / PHP: 4.4.4 - 4.3.1 X-CART Shop carts at http://www.nightscene.co.uk/shop/home.php http://www.theshisha.net/shopcart/home.php http://www.system-maintenance.com/maint/home.php http://www.tabac4u.com |
|||||||||
#5
|
|||||||
|
|||||||
Re: New "Quantity" sorting rule
This is a great mod, thanks!
Only problem I have is when the product has variants, it will go to the back as well Any ideas to solve this? Would it be possible in some way to move JUST the "out of stock" to the back to the list, and keep the original ranking system of the products? Thanks again
__________________
PuroPlacer X-Cart version X-Cart Pro 4.1.5 |
|||||||
#6
|
|||||||
|
|||||||
Re: New "Quantity" sorting rule
UPDATE xcart_modules SET active='N' WHERE moduleid='87';
i dont have any module with ID = 87 ! what is tha module name ?
__________________
X-Cart 4.4.5 | Linux/Apache | PHP 5.2.17 | MySQL 5.0.77 | FireFox |
|||||||
#7
|
|||||||
|
|||||||
Re: New "Quantity" sorting rule
For 4.3 versions???
|
|||||||
#8
|
|||||||||
|
|||||||||
Re: New "Quantity" sorting rule
Is any method for latest 4.5x branch? This is a great idea. The customer will see the product which has most quantity first. And put the low or out of stock last.
__________________
Richard Ultimate 5.4 testing |
|||||||||
#9
|
|||||||
|
|||||||
Re: New "Quantity" sorting rule
can you please help me
i have 4.5.5 version and i need to sort the list of variant and show the out of stock at end of the row . what i mean is when one color is out of stock then that color will be shown as last option in variant list . do you have a code for this
__________________
2.35 |
|||||||
#10
|
|||||||
|
|||||||
Re: New "Quantity" sorting rule
Quote:
Did you ever come up with a solution for this in 4.5 or 4.6? We are running 4.6.1 and would love to be able to sort by qty so that sold out items appear last in the list.
__________________
X-Cart Gold 4.6.1 Active store: anthonynappawines.com/xcart |
|||||||
|
|||
X-Cart forums © 2001-2020
|