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

Mark a product as New from date to date

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #11  
Old 01-25-2011, 12:28 PM
  ADDISON's Avatar 
ADDISON ADDISON is offline
 

X-Man
  
Join Date: Jan 2008
Posts: 2,613
 

Default Re: Mark a product as New from date to date

In some markets/countries customer reaction is very very delayed. So, setting a product from time to time is the best option in this case.

Anyway I thank all for your solutions. Keep going!
__________________
X-Cart Next: Business 5.2 (learning and testing)
X-Cart Classic: Gold and Gold Plus 4.7
Lots of Modules and Customizations
OS in use: Red Hat Enterprise, Fedora, CentOS, Debian, Ubuntu, Linux Mint, Kali Linux
Ideas for Server configuration (basicaly): Nginx/Pound (reverse proxy), Apache/Nginx (webserver), Squid/Varnish (cache server), HHVM or (PHP-FPM + PHP 5.6 + opcache), MariaDB/Percona MySQL Server, Redis (storing sessions)

You can catch my ideas here: http://ideas.x-cart.com
Reply With Quote
  #12  
Old 09-28-2011, 06:21 AM
 
philrisk philrisk is offline
 

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

Default Re: Mark a product as New from date to date

Quote:
Originally Posted by am2003
If someone wants to give it a try, here are some idea.

Backend:

- a new check box (Mark Product as NEW) and 2 input boxes (From To). This can be done using jQuery Data Picker (data range): http://jqueryui.com/demos/datepicker/#date-range. In General Setting you have to set up the time by default, let's say 30 days in case you mark a product as NEW but no range is defined.

Frontend:

- php file extracting from database the range a product should be marked as NEW. if no range, you can use by the default specified in General Settings.

- template file - if product is new, use some graphics to show the product is NEW. Over the product image using CSS, inline, how do you prefer.

Has anyone built this yet?
__________________
Live with Gold 4.5.1
Dedicated Linux server
MaxCDN 4 pull zones
Dedicated SSL

Reply With Quote
  #13  
Old 10-02-2011, 02:58 AM
  JWait's Avatar 
JWait JWait is offline
 

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

Default Re: Mark a product as New from date to date

Quote:
Originally Posted by cflsystems
Yes using the add_date field works too the way you have it. I don't think changes to tables or php are required. The only thing will be if you wan to bump that product as new again you will have to change add_date to more recent one. But yes that is the simplest way to do it and works

There is something to be aware of when using add_date, if you import anything to an existing product via .csv the add_date will be changed to the current date... at least it did the last time we did it.

This may have changed on more recent versions of x-cart than the 4.2.3 version we are currently using, I don't know. Just something to be aware of or you may get unexpected results... like everything being marked as "new".
__________________
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
  #14  
Old 10-02-2011, 06:58 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Mark a product as New from date to date

Yes this is correct, if you don't import date XC will use current date and replace the existing one. This along with the clean urls (if you don't specify them in the import file XC will generate them again overwritting your custom urls even if they exist in the database) is like a bug as the import should not regenerate data if not supplied by the import file and exists in the database. QT will tell you it's a feature
__________________
Steve Stoyanov
CFLSystems.com
Web Development
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 11:53 AM.

   

 
X-Cart forums © 2001-2020