Archive products sold to new type
Hi
I am looking for a way of having products move from being available in the shop to been in an archive of goods we've made in the past, so people can see previous works... but, I've been asked not to show the price on these previous pieces.
There are obviously two components to this.
1) automatically moving the products when the qty avail=0 to a different category; and
2) defining how we display the archive category without any prices.
I'm open to suggestions about how I acheive 1) without changing the core code.
With respect to 2) I can see two ways to do this.
A) Checking to see which category the user is in and if it is the archive then do not show the price. This will probably need me to make changes to:
includes/modules/<template>/product_list.php
includes/templates/<template>/templates/tpl_product_info_display.php
or
B) I could create a new product type that does not display prices and assign that product type to the archive category.
Anybody have any advice either way on these two possible solutions.
Many thanks
Greg
Re: Archive products sold to new type
Doing this automatically will require extensive custom coding
Moving manually would be much simpler and I assume that someone will have to be in the admin for order fulfillment
Re: Archive products sold to new type
B would be a lot easier, since the function is built in to Zencart. You could just rename one of the existing product types you aren't using. It would be a manual process, though, since I don't believe you can move a product from one product type to another.
Re: Archive products sold to new type
I actually do not think you need to change product type
Just manually change it to "call for price", move it to a category for sold works and edit the call for price image to be a copy of pixel_trans.gif - - renamed to match the call for price image name.....
Re: Archive products sold to new type
We will only ever have one of any product because they consist of custom carvings. I want to maintain a record of what the pieces were listed for, so I really dont want to have to remove the price and set to "call for price" instead.
For automatically moving the products from one category to the next I was going to write a simple observer class. Probably extended on NOTIFY_HEADER_END_CHECKOUT_SUCCESS.
If I move the product from a category of one product type to a category which has another, does it automatically update the product type of that product to match that of the new category?
Thanks
Re: Archive products sold to new type
Quote:
If I move the product from a category of one product type to a category which has another, does it automatically update the product type of that product to match that of the new category?
Not without some code intervention
Re: Archive products sold to new type
If there are not changes to the database tables for this Sold Out Product type ... you could customize the code in the order class and around line 736 you will see:
Code:
$this->notify('NOTIFY_ORDER_PROCESSING_STOCK_DECREMENT_END');
Change the products_type and remove the products_id from the products_to_categories table then add it back in with your Sold Out Categories and change its master_categories_id to the Sold Out Categories categories_id ...