X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Listing newest added product first (https://forum.x-cart.com/showthread.php?t=18788)

Ten 11-03-2006 02:37 PM

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.

Ten 11-04-2006 04:06 AM

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!

Jerrad 11-05-2006 07:14 AM

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!

ShishaPipeUK 11-07-2006 03:14 PM

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 ?

LoveHurts 03-18-2007 02:58 AM

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?

mike@eternitywebdev.com 03-21-2007 09:30 AM

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

JWait 03-28-2007 06:12 PM

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.

whirledplanet 04-04-2007 06:36 PM

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?

JWait 04-04-2007 07:48 PM

Re: Listing newest added product first
 
You are not doing anything wrong. This modification does not work correctly in 4.1.x.

JWait 07-24-2007 09:24 AM

Re: Listing newest added product first
 
Any update on this to work with the current version of xcart (4.1.8)?


All times are GMT -8. The time now is 07:01 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.