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

Sort by "Date Added" in the Sort by bar...

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-19-2010, 06:13 PM
  ScrapProfessor's Avatar 
ScrapProfessor ScrapProfessor is offline
 

Advanced Member
  
Join Date: Mar 2008
Posts: 90
 

Default Sort by "Date Added" in the Sort by bar...

Hi Guys,

I am really wanting to have a sort by "Date Added" link in my sort bar and I'm wanting it to be the default when a customer visits that category/page. I'd like all the newest products withing any category/page to be listed first. Older products will be seen listed below the newer ones. I know there is a mod out there for 4.3.x but it creates a drop down menu and I think it's ugly. I don't like it. I had a WONDERFUL (and free) sort by date feature in my old version of x-cart pro - 4.1.9, but it's not being updated to work with 4.3.x (I have 4.3.1 pro)

I know there are some highly talented folks that hang out here and I'm hopeful you'll step up and help me out. I'm sure I'm not the only one who would love this! Following is a screen shot of where I'd like it to be, obviously in the sort bar, and I do want it to say "Date Added" if possible, and be the default setting. Hopefully this is an easy task. I never know with x-cart. Sheesh! (:

In fact, if it's easier to modify the 'Default' word to be "Date Added" and modify the right template(s) so it sorts by date added to the store, that would be great too! Unless I'm missing some other reason why 'default' is even there, and why isn't sorting by "Date Added" a part of x-cart already?? hmmm.

I appreciate your time so very much!

http://www.scrapdelicious.com/images/SD2.jpg
__________________
Joli Kirk,
"Life is not measured by the number of breaths we take, but by the number of moments that take our breath away"

X-Cart PRO 4.3.1 | Linux | PHP 5 | MySQL 5


AlteredCart.com - Download Expander; Product Page Downloads
BCSEngineering.com - On Sale Products; Newest Added Products
Reply With Quote
  #2  
Old 08-20-2010, 03:06 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Sort by "Date Added" in the Sort by bar...

You can use this
http://www.bcsengineering.com/store/product-sort-by_pro-for-x-cart.html
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #3  
Old 08-20-2010, 08:21 AM
  ScrapProfessor's Avatar 
ScrapProfessor ScrapProfessor is offline
 

Advanced Member
  
Join Date: Mar 2008
Posts: 90
 

Default Re: Sort by "Date Added" in the Sort by bar...

Thanks Steve, but I don't want a drop down menu. I actually want it just like it is in my screen shot, only with the words "Date Added" to replace the words 'default' so when a customer visits a page it will show the newest products first in the list.

Hopefully someone can make this happen. Again, I had it for my 4.1.9 pro version and it was exactly what I wanted (and it was free) but it isn't an option with pro 4.3.1.

Thanks to anyone who can help, and Steve for trying!
__________________
Joli Kirk,
"Life is not measured by the number of breaths we take, but by the number of moments that take our breath away"

X-Cart PRO 4.3.1 | Linux | PHP 5 | MySQL 5


AlteredCart.com - Download Expander; Product Page Downloads
BCSEngineering.com - On Sale Products; Newest Added Products
Reply With Quote
  #4  
Old 08-20-2010, 06:55 PM
  ScrapProfessor's Avatar 
ScrapProfessor ScrapProfessor is offline
 

Advanced Member
  
Join Date: Mar 2008
Posts: 90
 

Default Re: Sort by "Date Added" in the Sort by bar...

Anyone? I'm willing to pay a few bucks to have this done and work right. Thx!
__________________
Joli Kirk,
"Life is not measured by the number of breaths we take, but by the number of moments that take our breath away"

X-Cart PRO 4.3.1 | Linux | PHP 5 | MySQL 5


AlteredCart.com - Download Expander; Product Page Downloads
BCSEngineering.com - On Sale Products; Newest Added Products
Reply With Quote
  #5  
Old 08-20-2010, 07:29 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Sort by "Date Added" in the Sort by bar...

I don;t think this was ever part of the default cart install. Maybe someone did it for you for free before or you just had it as part of some other mod. This requires php files changes as well as templates. That's why I suggested ready mod, having this custom coded will cost you more then buying the mod. And the why mod shows search fields can be modified
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #6  
Old 08-20-2010, 07:38 PM
  ScrapProfessor's Avatar 
ScrapProfessor ScrapProfessor is offline
 

Advanced Member
  
Join Date: Mar 2008
Posts: 90
 

Default Re: Sort by "Date Added" in the Sort by bar...

Hi Steve,

No, it wasn't part of any default x-cart version. It was a free module available at BCSE. In fact, it's still there but it's not compatible with 4.3.x and they tell me they won't be updating it for future versions and directed me to the same module you directed me to. I did buy that module, however, I really hate the drop down menu... they are ugly.

I really just want the word 'default' (located in the 'Sort by' bar in my version of x-cart, as shown in the previous screenshot) to be replaced with the words "Date Added" and have it automatically sort by date added and put the newest products first in the list. So when a customer goes to any page it loads by default and shows the newest products first.

Does that make sense? Is it really going to be this big of a headache to achieve? In the back of my brain it seems like it could be done easily but I do not have the knowledge required to create the necessary PHP if that's what it would take.

I appreciate your time, and I'm still hopeful someone around here can help me. (:
__________________
Joli Kirk,
"Life is not measured by the number of breaths we take, but by the number of moments that take our breath away"

X-Cart PRO 4.3.1 | Linux | PHP 5 | MySQL 5


AlteredCart.com - Download Expander; Product Page Downloads
BCSEngineering.com - On Sale Products; Newest Added Products
Reply With Quote
  #7  
Old 08-21-2010, 05:19 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Sort by "Date Added" in the Sort by bar...

Not tested, make sure you backup the file first:

you can try this - open include/search.tpl, find
Code:
default: $sort_string = "$sql_tbl[products].product";
and replace with
Code:
default: $sort_string = "$sql_tbl[products].add_date $direction";
Just below it find
Code:
else { $sort_string = "$sql_tbl[products].product"; }
and replace with
Code:
else { $sort_string = "$sql_tbl[products].add_date DESC"; }
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #8  
Old 08-21-2010, 04:18 PM
  ScrapProfessor's Avatar 
ScrapProfessor ScrapProfessor is offline
 

Advanced Member
  
Join Date: Mar 2008
Posts: 90
 

Default Re: Sort by "Date Added" in the Sort by bar...

Hi Steve, thanks for trying to help but that didn't appear to do it.

Any other ideas?

Anyone?

I do appreciate the help!
__________________
Joli Kirk,
"Life is not measured by the number of breaths we take, but by the number of moments that take our breath away"

X-Cart PRO 4.3.1 | Linux | PHP 5 | MySQL 5


AlteredCart.com - Download Expander; Product Page Downloads
BCSEngineering.com - On Sale Products; Newest Added Products
Reply With Quote
  #9  
Old 09-13-2010, 04:29 AM
 
philrisk philrisk is offline
 

X-Adept
  
Join Date: Jul 2009
Location: Newcastle upon Tyne, UK
Posts: 412
 

Default Re: Sort by "Date Added" in the Sort by bar...

Does the BCS addon allow you to choose one of these new sort-bys as your default in General settings?
__________________
Live with Gold 4.5.1
Dedicated Linux server
MaxCDN 4 pull zones
Dedicated SSL

Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 01:58 PM.

   

 
X-Cart forums © 2001-2020