| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
show / hide items on a certain day / month etc | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
show / hide items on a certain day / month etc
I have setup a store for an organization that needs to close the store once a week for religious reasons.
I've been manualy setting the store closed and then opening it in the general settings. I'm sure no one has done this but I wondered if anyone knew of a simple way to automate this process.
__________________
x-cart 3.8 |
|||||||
#2
|
|||||||||
|
|||||||||
if you want something to happen on say sunday ...
Code:
http://smarty.php.net/manual/en/language.modifier.date.format.php or http://smarty.php.net/manual/en/language.variables.smarty.now.php for more info
__________________
Looking for a reliable X-cart host ? You wont go wrong with either of these. EWD Hosting Hands On Hosting |
|||||||||
#3
|
|||||||||
|
|||||||||
Move to Custom Mods. This is too darn useful.
Imagine having a recurring sale every Friday. You could code the Sale message to appear automatically without having to manually update your site text. The possibilities are endless. Nice post Shan. |
|||||||||
#4
|
|||||||
|
|||||||
Shan would are you saying I can just switch templates at a particular time?
Is there a way I could just add a redirect somewhere wrapped in the conditional tag? Is that what the store closed setting does? Thanks.
__________________
x-cart 3.8 |
|||||||
#5
|
|||||||||
|
|||||||||
You could PROBABLY wrap a fast meta refresh to a page explaining why you are closed.
|
|||||||||
#6
|
|||||||||
|
|||||||||
i was thinking in home.tpl you could say
if sunday show closed message else show home.tpl page as normal
__________________
Looking for a reliable X-cart host ? You wont go wrong with either of these. EWD Hosting Hands On Hosting |
|||||||||
#7
|
|||||||||
|
|||||||||
True but if your store is really religious (I am trying to be serious as I type), then they shouldn't be able to place orders on religious days off.
Otherwise the "store" would be working. I guess it depends on the interpretation and implementation. |
|||||||||
#8
|
|||||||||
|
|||||||||
What I would do, is create a php script that connects to the database and changes the general settings open/close toggle off.
Then I'd create a second file that that toggles the store back on. I'd then setup a weekly cron script to run the close script when needed, and then runs the open script to turn it back on when needed. |
|||||||||
#9
|
|||||||||
|
|||||||||
could do, long way round though
__________________
Looking for a reliable X-cart host ? You wont go wrong with either of these. EWD Hosting Hands On Hosting |
|||||||||
#10
|
|||||||||
|
|||||||||
It is a bit more to setup, but really wouldn't take more than 15 minutes or so. The only reason personally I'd prefer to do it this way is that it would physically close the store using the x-cart infrastructure instead of just changing the display template.
The other way is definitely simpler though The code could be put around the center text include in /customer/skin1/home.tpl |
|||||||||
|
|||
X-Cart forums © 2001-2020
|