Zen Cart Logo
Forums / All Other Contributions/Addons / Add product expiration date

Add product expiration date

Locked

Views: 2,328

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
14 Mar 2007, 5:20 AM
#1
mige avatar

mige

New Zenner

Join Date:
Mar 2007
Posts:
4
Plugin Contributions:
0

Add product expiration date

My products are workshops and I need to filter out past workshops from product listings. I need something very similar to featured products, almost exactly the same. Has anybody done this? How can I completely duplicate the feature products ? Well

  1. I need to create a table like featured products,lets say product_exp.
  2. Make it available in the admin product pages for data entry.
  3. Then all queries(or those I use such, as featured products etc.. ) queries have to filter out expired products.Is there any workaround or easier way to do this?

Thank you for your suggestions! Mige:lamo:

15 Mar 2007, 7:30 AM
#2
mige avatar

mige

New Zenner

Join Date:
Mar 2007
Posts:
4
Plugin Contributions:
0

Re: Add product expiration date

Well, I have not seen any replies but meanwhile, I figured out I could use the field 'product_date_available' in reverse, that means in my product listings I exclude products (in my case workshops) that have become available. Which "select queries" and functions do I need to change? I would appreciate if somebody with better knowledge of the code could point me towards the right direction. Mige

17 Mar 2007, 5:54 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Add product expiration date

The product_date_available actually has a purpose in Zen Cart already and you will need to disable its current use and re-write it to work in your method ... which is actually harder, I would think ...

You would be better off building in a new field for the product_expires_date or have the code customized for you ...

If you look at where the products_date_available is in the Admin for where to put the code, you can also look at the products_price_manager for how to manage multiple dates on the same page for adding/editing etc.

Now, you would have a field that you can check similar to the Featured, Specials and Sales where when a customer hits your site for the first time, the Products are updated to automatically move out of stock on their expiration date ...

20 Mar 2007, 4:18 AM
#4
mige avatar

mige

New Zenner

Join Date:
Mar 2007
Posts:
4
Plugin Contributions:
0

Re: Add product expiration date

Thank you! for pointing me towards the right direction. Here is what I understand, I should:
Create an additional table similar to featured.
Make start_date, end_date fields available through 'products_price_manager.php', to be set.
I am not sure how the product_status update is going to happen. I am assuming this is not happening through a database trigger? I don't have a clear grasp of 'products_price_manager.php' code. May I ask for some code segment suggestions?
One more thing I haven't touched any code other than in the include files how do I create an override system in admin area?
Thanks again! Mige:smile:

20 Mar 2007, 5:16 AM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Add product expiration date

You could use either a new table or the products table that is up to you ...

If you are following Featured for tracking the code just do a search in the Developer's Tool Kit for the word:
featured

And that should locate all language, variables, constants, functions etc. etc. etc. that is used ...

20 Mar 2007, 6:55 PM
#6
mige avatar

mige

New Zenner

Join Date:
Mar 2007
Posts:
4
Plugin Contributions:
0

Re: Add product expiration date

I justed wanted to understand for a future Zen Cart upgrade what, adding extra fields to the products table, entails? Let's say I added the fields to the end of the products table, I won't be affecting any of the existing functions in Zen Cart? (of course other than anything that lays fields into in tabular format)

Let's assume Zen Cart upgrade has added new fields, I incorporate these new fields into my product table and keep what I have, I should be fine using the upgrade?

as far as the updates go, I am still not clear, how does the updates happen after the first user accesses the database on the day of the expiration of a workshop? Thanks! :unsure:

15 Nov 2008, 9:31 AM
#7
miguelitox avatar

miguelitox

New Zenner

Join Date:
Nov 2008
Posts:
1
Plugin Contributions:
0

Re: Add product expiration date

So has there been any development in this area? I too am building a ticket sales system and I can't find any way to make the dates that have passed become inactive or automatically deleted. Using the featured product method for this is not an option for me because i'm using that designation for an "On Stage Tonight" side box.

I've edited the database to include an extra field of "product_date_expiration" but i've had a very difficult time making this a usable field in the admin add product page - not to mention that making the field do what i want it to do is way over my head.

any suggestions? help please....

mx

2 Dec 2008, 1:52 AM
#8
fl33140 avatar

fl33140

New Zenner

Join Date:
Mar 2007
Posts:
40
Plugin Contributions:
0

Re: Add product expiration date

No, there hasn't been any uppdates on this. I couldn't figure it out and for us it didn't matter as much.:no: