Product creation date? New products page?

General ShopSite user discussion

Product creation date? New products page?

Postby Capt.Goodvibes » Thu Jul 12, 2007 12:55 pm

I'm looking for a way to make a "new products" page. I need the date a product was created and conditional syntax to check the difference between "now" and the "creation date". Is this possible in Shopsite? Worst case... I can do the check with php but I need the product creation date.

Also, would I have to add all products in the Shopsite DB to the page to be able to "see" them for my date test? What would the processor overhead look like with 1,000, or even 10,000 products on a single page?

Thanks
Capt.Goodvibes
 
Posts: 18
Joined: Fri Nov 10, 2006 5:36 pm

Postby Jim » Thu Jul 12, 2007 2:26 pm

There is no template tag that will give the product creation date. There is only an "equal" comparison not a greater/less than so you need to do an exact comparison not a relative one.

What I would do is use one of the custom product fields to specify a text value that would indicate when the product was added i.e. Jan07, Feb07, Mar07 etc. Then on your "new products" page use one of the custom fields to indicate which value to use for including the product on the page.

Say you want Jan07 new items so you add that text to Page custom field 1. And the same value to the product field1 for new products added in Jan07. Then you could do something like

IN the page template:
[-- VAR.month page.field1 --]

[-- loop products --]
[-- product newitem_template --]
[-- end_Loop products --]

and in the product template newitem_template

[-- IF VAR.month "product.field1" --]
spit out the product
[-- else --]
don't do anything
[-- end_if --]

You could assign all products to the page and let publish determing wheich to put on the page. You could also remove all products from the page each time you publish and then do a search for all products where product fieldx contains the specific text you are searching on and assign just those items.

Over head time will depend on a lot of things. If you have more info pages for each item it will take longer, if you have lots of subproducts it might take longer, if you are using subproducts as cross sell items on lots of pages it will take longer. It's hard to say exactly how much time it would take but I have published stores with 30K products, most with moreinfopages and 1000 page and it took about 30 minutes. Of course it depends alot on what speed your server is and what else might be going on when you publish.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby Capt.Goodvibes » Tue Jul 17, 2007 12:20 pm

Alright, I'll see what I can come up with. Thanks
Capt.Goodvibes
 
Posts: 18
Joined: Fri Nov 10, 2006 5:36 pm


Return to User Forum

Who is online

Users browsing this forum: No registered users and 58 guests