Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Listing newest added product first

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #21  
Old 11-03-2006, 02:37 PM
 
Ten Ten is offline
 

Newbie
  
Join Date: Sep 2006
Posts: 2
 

Default Re: Listing newest added product first

It's not working on 4.0.17.

What should be the value for $sort_string ?

I'm getting this: "xcart_products_categories.orderby ASC"

I think it's not valid. I followed all steps.

Thx.
__________________
/home/
Reply With Quote
  #22  
Old 11-04-2006, 04:06 AM
 
Ten Ten is offline
 

Newbie
  
Join Date: Sep 2006
Posts: 2
 

Default Re: Listing newest added product first

Finally It's working on 4.0.17.

That's what I had to do:

- It wasn't working with the first indications, and I could not change in the database what lachild said, because my version hasn't a field 'variants' in xcart_config.

So, in /admin/configuration.php:

Around line 143:
Code:
$products_orderby = array( "productcode" => func_get_langvar_by_name("lbl_sku"), "title" => func_get_langvar_by_name("lbl_product"), "orderby" => func_get_langvar_by_name("lbl_default"), "price" => func_get_langvar_by_name("lbl_price")

Before "productcode", add

Code:
"add_date" => func_get_langvar_by_name("lbl_date"),

And it's working very well, and I can change the order from the admin/General Settings/Appearance/ Select the order...

Hope this help!
__________________
/home/
Reply With Quote
  #23  
Old 11-05-2006, 07:14 AM
 
Jerrad Jerrad is offline
 

X-Adept
  
Join Date: Nov 2004
Location: The Netherlands
Posts: 484
 

Default Re: Listing newest added product first

Thanks for this great mod!
Newest products are indeed shown first, but unfortunately the ASC or DESC sort doesn't work for me either...

Any body got this fixed for version 4.x?
Thanks!
__________________
X-Cart 4.0.12
Heavy modified with paid, free and forum mods.
PHP 5.2.5 | MYSQL 5.0.51a
Reply With Quote
  #24  
Old 11-07-2006, 03:14 PM
  ShishaPipeUK's Avatar 
ShishaPipeUK ShishaPipeUK is offline
 

Senior Member
  
Join Date: Jul 2005
Location: London, England.
Posts: 118
 

Default Re: Listing newest added product first

I want to be able to sort my products by quantity in stock, so my customer views the most products in stock first.
Now at the moment in the admin section we have in X-Cart admin->General Settings->Apperance: "Select the order in which products should be displayed within a category:"
SKU
PRODUCT
PRICE
DEFAULT
I want to add to this QUANTITY so all my low quantity items and out of stock items will be displayed last when a customer is viewing the products.

Anyone got any ideas ?
__________________
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
Reply With Quote
  #25  
Old 03-18-2007, 02:58 AM
  LoveHurts's Avatar 
LoveHurts LoveHurts is offline
 

Advanced Member
  
Join Date: Mar 2007
Posts: 39
 

Default Re: Listing newest added product first

Worx fine !!!! Thx guys !!!!

I couldnt not set sort by date as default.
everytime i klick on category, it's sort by name.

how can i set this is the 'default' sort?
__________________
Core version: 5.3.4.4
PHP: 5.6
Web server: Apache
---stll running a---
x-cart PRO 4.1.6 [unix] updated to 4.1.9
Belgium
Reply With Quote
  #26  
Old 03-21-2007, 09:30 AM
 
mike@eternitywebdev.com mike@eternitywebdev.com is offline
 

Member
  
Join Date: Mar 2007
Posts: 12
 

Default Re: Listing newest added product first

Is there a way to make this mod do the following:

1. AUTO show newest added products
2. But ALSO be able to use the Manual ORDER to move specific products around?

X-Cart Gold 4.0.19
__________________
Mike
V.4.1.11
V 4.2.2
Reply With Quote
  #27  
Old 03-28-2007, 06:12 PM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: Listing newest added product first

Quote:
Originally Posted by LoveHurts
Worx fine !!!! Thx guys !!!!

I couldnt not set sort by date as default.
everytime i klick on category, it's sort by name.

how can i set this is the 'default' sort?

Thats what I'm looking for, sort by add_date = newest by default in x-cart 4.1.6. It works fine as is for x-cart 4.0.19.
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #28  
Old 04-04-2007, 06:36 PM
 
whirledplanet whirledplanet is offline
 

Member
  
Join Date: Oct 2006
Posts: 10
 

Default Re: Listing newest added product first

Just wondering what I'm doing wrong. I've made all the changes Boomer outlined (thanks Boomer), and the date option appears, but it doesn't default to date. In other words, if I choose SKUchoose as the default in general settings--> appearance, it still sets SKU to be the default. There is no way to set date as the default. A customer can choose to order by date, but I want date to be automatically chosen so they see newest items first by default.

Any help?
__________________
Mike
Whirled Planet
XCART GOLD V.4.1.3
Reply With Quote
  #29  
Old 04-04-2007, 07:48 PM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: Listing newest added product first

You are not doing anything wrong. This modification does not work correctly in 4.1.x.
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #30  
Old 07-24-2007, 09:24 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: Listing newest added product first

Any update on this to work with the current version of xcart (4.1.?
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:32 PM.

   

 
X-Cart forums © 2001-2020