X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Mark a product as New from date to date (https://forum.x-cart.com/showthread.php?t=57678)

ADDISON 01-25-2011 12:28 PM

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!

philrisk 09-28-2011 06:21 AM

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?

JWait 10-02-2011 02:58 AM

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". 8O

cflsystems 10-02-2011 06:58 AM

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 :)


All times are GMT -8. The time now is 10:02 AM.

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