Forums / General Questions / Products sold out - need them to automatically goe to a sold out category.

Products sold out - need them to automatically goe to a sold out category.

Started by monkeytastic on 26 May 2007, 10:42 AM · Views: 2,916

Results 1 to 8 of 8
26 May 2007, 10:42 AM
#1
monkeytastic avatar

monkeytastic

Zen Follower

Join Date:
Dec 2006
Posts:
141
Plugin Contributions:
0

Products sold out - need them to automatically goe to a sold out category.

I sell items that I'd like to 'sold out' items to remain visible in my shop but not in the actual products for sale section.

For example, if you look at http://www.skateboardstickers.co.uk/index.php?main_page=index&cPath=1_9 I'd like the top 2 to automatically move to an 'archive' or 'sold out' category so people don't have to scroll through the sold out items.

I understand this would be possible by hand by copying the products to a 'archive' or 'sold out' but this would be time consuming for when products sell or if I restock. Is there an automatic way for products to automatically move or does anyone have any tips to make this a less time consuming process.

26 May 2007, 12:17 PM
#2
econcepts avatar

econcepts

Totally Zenned

Join Date:
Dec 2005
Posts:
1,505
Plugin Contributions:
2

Re: Products sold out - need them to automatically goe to a sold out category.

monkeytastic:

I sell items that I'd like to 'sold out' items to remain visible in my shop but not in the actual products for sale section.

For example, if you look at http://www.skateboardstickers.co.uk/index.php?main_page=index&cPath=1_9 I'd like the top 2 to automatically move to an 'archive' or 'sold out' category so people don't have to scroll through the sold out items.

I understand this would be possible by hand by copying the products to a 'archive' or 'sold out' but this would be time consuming for when products sell or if I restock. Is there an automatic way for products to automatically move or does anyone have any tips to make this a less time consuming process.

Not sure how versed you are in PHP, but could you take the function for "Moving Products" (from within the Admin by clicking on "M" icon to the right of a product) and then incorporate that into the script that checks to see if the item is sold out (thus placing the "sold out" icon by it). In effect you could possibly "move" the product automatically that way.

A few thoughts though.

  1. What happens when the product is "back in stock"? Aren't you going to have to move it back to the category it came from? Wouldn't that be as much if not more work than just leaving it where it is? It looks like you are going to have to do the work of moving it anyhow aren't you?

  2. Why would you even create a "sold out" category? If users can't buy the products anyhow, then I personally wouldn't include them on the site (unless you restock inventory pretty quickly). Including them on the site only gives the visitor more opportunity to "click away from" items that they CAN buy! Giving a visitor too many choices will almost always result in decreases in conversion (lost sales). A single category dedicated to items that users can't buy anyhow to me makes no sense?

  3. To circumvent the sold out items being at the top of the listings, and to avoid the need to PHP code, as an alternative, couldn't you just sort them to the bottom of the category they are in? That way users wouldn't have to scroll through them.

My 2 cents. Hope it helps. :)

Eric
20 Ways to Increase Sales Using Zen Cart
Zen Cart contribs: Simple Google Analytics, Export Shipping Information

26 May 2007, 1:01 PM
#3
monkeytastic avatar

monkeytastic

Zen Follower

Join Date:
Dec 2006
Posts:
141
Plugin Contributions:
0

Re: Products sold out - need them to automatically goe to a sold out category.

Many thanks for the reply.

The reason for keeping the sold out items on display is because many of the products are pretty old/collectables and visitors say they like simply viewing the images even if they're not buying. With some categories having a fair number of sold items, it's come to the point where for people wishing to simply buy, the sold out items are getting in the way.

I guess the best solution is to make a new category called "archive" and when I go to the admin catelog and see items with 0 products, I can move these to the archive section. When I get sold items back in stock, I can then restock and move them back to their relevant category.

I was just wondering if there was an automatic way but thinking about it, manually wouldn't be too hard.

26 May 2007, 1:24 PM
#4
ajeh avatar

ajeh

Oba-san

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

Re: Products sold out - need them to automatically goe to a sold out category.

This can be done where either the Product is moved as a Linked Product or moved totally to another Category ...

You need to customize the orders class for this to work ...

NOTE: there are no overrides for the orders class ... so backup your original code and your changes for when you do future upgrades ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

26 May 2007, 3:22 PM
#5
monkeytastic avatar

monkeytastic

Zen Follower

Join Date:
Dec 2006
Posts:
141
Plugin Contributions:
0

Re: Products sold out - need them to automatically goe to a sold out category.

Hi.

I'm not sure what I'd need to be editing in the orders class :unsure:

26 May 2007, 3:41 PM
#6
ajeh avatar

ajeh

Oba-san

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

Re: Products sold out - need them to automatically goe to a sold out category.

You find the spot where the stock is updated ...

Find this section of code:

          if ($stock_left <= 0) {
            // only set status to off when not displaying sold out
            if (SHOW_PRODUCTS_SOLD_OUT == '0') {
              $db->Execute("update " . TABLE_PRODUCTS . " set products_status = 0 where products_id = '" . zen_get_prid($this->products[$i]['id']) . "'");
            }
          }

And you would need to write some custom code to change the products_to_categories table and the products table to manage which category the Product is now in ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

26 May 2007, 8:37 PM
#7
monkeytastic avatar

monkeytastic

Zen Follower

Join Date:
Dec 2006
Posts:
141
Plugin Contributions:
0

Re: Products sold out - need them to automatically goe to a sold out category.

Thanks but I don't know anything about how to create custom code for this :unsure:

I've just moved all the sold items to an archive section for now and will have a look into changing the code.

28 Mar 2011, 3:08 AM
#8
blingin avatar

blingin

New Zenner

Join Date:
Jun 2010
Location:
Australia, Sydney
Posts:
13
Plugin Contributions:
0

Re: Products sold out - need them to automatically goe to a sold out category.

did you have any luck in getting your archive category up and running? This would be great feature, and good for seo so you don't get 404 errors being reported to google.