50 replies [Last post]
Magrathea's picture
Offline
Joined: 10/24/2008
Juice: 60

G'day all,
I'm a new user of Ubercart and I'm installing it on Drupal 6 for a website that will sell Birdhouses. The birdhouses are all one-off art pieces so when one gets sold it will have to be removed from ubercart.

Firstly I need a way to display just the images of all of the birdhouses on a single page (there will be about 16 or so) but the images need to sync with the Ubercart so that when a birdhouse is sold it is removed from the gallery. Any ideas on this? I installed the catalog module but it lists the text too and is too long, I just need a single image per birdhouse on one page.

I have played around with the inventory setting and stock reports but when I view the catalog I still see a product in it that has a stock value of 1 and a quantity of 0. Anyone know why this feature is not working or perhaps I don't understand its functionality.

Thanks for all the work done Ubercart devs and an affiliate fee will be coming your way via a new Pay Pal account signup.

Cheers
Richard
www.MyLittlePortal.com
www.Jacana.net

kobruleht's picture
Offline
Joined: 10/23/2008
Juice: 28
Re: Automatically remove one-off products that have been sold?

I encountered also this. After sale catalog shows items which have stock quantity zero. I havent foudn any option to disable it.

Magrathea's picture
Offline
Joined: 10/24/2008
Juice: 60
Still no luck

Ok, seems like no one is reading this post or knows how to solve the problem. On the good news front I did figure out how to create a gallery of products using our old friend the View module. After some tweaks of the style sheets it looks great. The latest version of views is a beast but just play around with it and you'll be up and riding in no time.

For now the client will have to un-publish the product node once it's sold, makes sense really cos all are one-off art pieces but it would be nice to have this done automagically.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15422
Re: Still no luck

Just a quick bit of brainstorming... if you know PHP, you can create a custom Workflow-ng action that includes PHP to look at the products on an order and unpublish their nodes if need be. Something like...

<?php
  $nids
= array();

  foreach (

$order->products as $product) {
   
$nids[] = $product->nid;
  }

 

node_operations_unpublish($nids);
?>

Obviously, you might need to tweak that to make sure only those unique products are being unpublished. Good luck!

Magrathea's picture
Offline
Joined: 10/24/2008
Juice: 60
Yeah

Ryan, I have been known to dabble in a little PHP so I'll give this a try, thanks!

mydllurth's picture
Offline
Joined: 11/08/2008
Juice: 2
Just a bit more storm ...

That looks wonderful for global policy.

Could there be a mechanism to make physical products unavailable with inventory of 0 while automata need not be replenished? Having to reconfigure the workflow for each added product seems a bit tedious.

thehandyman's picture
Offline
Joined: 11/07/2008
Juice: 15
Ryan wrote:Just a quick bit
Ryan wrote:

Just a quick bit of brainstorming... if you know PHP, you can create a custom Workflow-ng action that includes PHP to look at the products on an order and unpublish their nodes if need be. Something like...

<?php
  $nids
= array();

  foreach (

$order->products as $product) {
   
$nids[] = $product->nid;
  }

 

node_operations_unpublish($nids);
?>

Obviously, you might need to tweak that to make sure only those unique products are being unpublished. Good luck!

Hi Ryan,

I'm trying to use your code, but it appears that it unpublishes all the products that a user ordered, not just the ones that have stock level = 0 after they complete their order.

Is there a way to go through all the $order->products and check stock levels?

Thanks!

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15422
Re: Ryan wrote:Just a quick bit

Right, that's what the line below the code example was pointing to... you'll need to wrap it in whatever if statement you need to accomplish that behavior. I don't have time to dig it up right now, but I believe there's a function you can pass $product->model to to find its stock level.

thehandyman's picture
Offline
Joined: 11/07/2008
Juice: 15
Re: Re: Ryan wrote:Just a quick bit

UPDATE: I found the solution. This code will check the stock of each product when completing an order, then unpublish any products that have a stock or zero or negative. I left the echo's in to help debug, but as it is nothing gets sent to the screen. Any bugs please let me know!

<?php
$nids
= array();

foreach (

$order->products as $product) {
 
//echo '<br />Checking the stock level of model:' . $product->model;
  //echo '<br />The stock level is ' . uc_stock_level($product->model) . ' which we check against zero';
 
if ((uc_stock_level($product->model) - 1) <= 0) {
   
   
//echo '<br />The stock level is zero or negative, unpublish nid:' . $product->nid;
    // if the stock WILL be 0 or negative after this order, then add to the list to unpublish
   
$nids[] = $product->nid;
  }
}
/*
echo '<pre><b>The nids that will be unpublished are:</b><hr>';
print_r($nids);
echo '</pre>';
*/
node_operations_unpublish($nids);
?>
Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15422
Re: Re: Re: Ryan wrote:Just a quick bit

If I were you, instead of - 1 you might use - $product->qty in case the customer buys 2, for example.

thehandyman's picture
Offline
Joined: 11/07/2008
Juice: 15
Re: Re: Re: Re: Ryan wrote:Just a quick bit

Good catch, here's the updated code:

<?php
$nids
= array();

foreach (

$order->products as $product) {
 
//echo '<br />Checking the stock level of model:' . $product->model;
  //echo '<br />The stock level is ' . uc_stock_level($product->model) . ' which we check against zero';
 
if ((uc_stock_level($product->model) - $product->qty) <= 0) {
   
   
//echo '<br />The stock level is zero or negative, unpublish nid:' . $product->nid;
    // if the stock WILL be 0 or negative after this order, then add to the list to unpublish
   
$nids[] = $product->nid;
  }
}
/*
echo '<pre><b>The nids that will be unpublished are:</b><hr>';
print_r($nids);
echo '</pre>';
*/
node_operations_unpublish($nids);
?>
Magrathea's picture
Offline
Joined: 10/24/2008
Juice: 60
Drupal 6.5 no go

Just realized that I'm out here in Drupal 6.5 land, so no workflow-ng for me and the conditional actions CAs don't work properly either. Seems like Cha0s may have a solution with a revised module http://www.ubercart.org/contrib/7359 . Will keep you posted.

chrisroge's picture
Offline
Joined: 12/29/2008
Juice: 12
Works Great - Thank You!!

This has been the one thing that has really kept me from moving from ZenCart to Ubercart, the lack of ability to hide products with 0 inventory. This code snippet has worked perfectly for me.

This is how this is implimented:

1. Go to WORKFLOW-NG.
2. Select ADD A NEW RULE CONFIGURATION.
3. Select CUSTOMER COMPLETES CHECKOUT for the EVENT.
4. Give it a nice label (anything).
5. Select SUBMIT.
6. Select ADD AN ACTION under ACTIONS.
7. Select EXECUTE CUSTOM PHP CODE then select ADD.
8. Paste the code snippet (but without the <?PHP ?> tags, as these can not be in the PHP dialog)!

$nids = array();

foreach ($order->products as $product) {
  // echo '<br />Checking the stock level of model:' . $product->model;
  // echo '<br />The stock level is ' . uc_stock_level($product->model) . ' which we check against zero';
  if ((uc_stock_level($product->model) - $product->qty) <= 0) {
   
  // echo '<br />The stock level is zero or negative, unpublish nid:' . $product->nid;
    // if the stock WILL be 0 or negative after this order, then add to the list to unpublish
    $nids[] = $product->nid;
    node_operations_unpublish($nids);
   
    // echo '<pre><b>The nids that will be unpublished are:</b><hr>';
// print_r($nids);
// echo '</pre>';

  }
}

// echo '<pre><b>Nothing to un-publish!</b><hr>';
// echo '</pre>';

9. Select SUBMIT.

I tested this and it seems to work very well. When I purchased a product with a stock value of 1 the stock was correctly decremented to 0 and the product was unpublished! Now my customers will not see products with 0 qty, which is what I think makes the most sense for a lot of ecommerce sites.

I hope this can be included in a future version of Ubercart?

Now, just need to find a way to create a worklow-ng for setting products back to published if the stock changes from 0 to 1!

LWD
LWD's picture
Offline
Joined: 04/19/2009
Juice: 14
Re: Works Great - Thank You!!

Hello, i'm actually working on ubercart 2 rc1 on a 6.10 drupal install
I tried to adapt the previous code for drupal 6.x. and I used :

node_unpublish_action($nids);
instead of
node_operations_unpublish($nids);

but i still have an error "warning: Attempt to assign property of non-object in drupal/modules/node/node.module on line 2623."

Could someone tell me what's wrong?

LWD
LWD's picture
Offline
Joined: 04/19/2009
Juice: 14
Quote:Hello, i'm actually
Quote:

Hello, i'm actually working on ubercart 2 rc1 on a 6.10 drupal install
I tried to adapt the previous code for drupal 6.x. and I used :

node_unpublish_action($nids);
instead of
node_operations_unpublish($nids);

but i still have an error "warning: Attempt to assign property of non-object in drupal/modules/node/node.module on line 2623."

Could someone tell me what's wrong?

up,
is it possible to have some help about that?

stilln's picture
Offline
Joined: 02/25/2009
Juice: 105
drupal 6 has no workflow-ng

where would I add this code to get it to work in drupal 6. because drupal 6 has no workflow-ng

Magrathea's picture
Offline
Joined: 10/24/2008
Juice: 60
Where does this code go?

Can you hand hold me here a little, where does this code go, create a Workflow-ng action? If so can you show me how to do this, I've played around with some actions but not sure where / how this one will work.

zeezhao's picture
Offline
Joined: 04/23/2008
Juice: 956
Re: Automatically remove one-off products that have been sold?

If you don't want to unpublish the node, you can also use the uc_stockstub module. It shows "out of stock" greyed out button instead of "add to cart" when inventory is 0. If you use this, you will need inventory_api, and hence mange your stock.

See these links:

http://www.ubercart.org/contrib/4792

http://www.ubercart.org/docs/user/5181/out_stock_solutions

This is useful until inventory is replenished.

vancouverWill's picture
Offline
Joined: 01/22/2009
Juice: 8
Drupal 6.8 problems

Any idea how to do this with current versions of Drupal such as 6.8+.

many thanks

Will

Minde_'s picture
Offline
Joined: 09/29/2008
Juice: 36
Re: Drupal 6.8 problems

I would also very much like to know how, if it is possible, to do this in Drupal 6. It seems that Conditional Actions doesn't give me the option to insert custom PHP code?

stilln's picture
Offline
Joined: 02/25/2009
Juice: 105
Re: Re: Drupal 6.8 problems

Will this work with products that have attributes with seprate skus.

stilln's picture
Offline
Joined: 02/25/2009
Juice: 105
move some where

is there any way to have the product once it hits 0 or less to be moved to another catagorie like "OUT OF STOCK ITEMS" instead of having it become unsubcribed.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15422
Minde_ wrote:I would also
Minde_ wrote:

I would also very much like to know how, if it is possible, to do this in Drupal 6. It seems that Conditional Actions doesn't give me the option to insert custom PHP code?

CA has both a custom PHP condition and action... just make sure you're not running an outdated version of UC.

Alaska's picture
Offline
Joined: 10/16/2007
Juice: 1433
What Version

Is this code for Uber 1.6 or Uber 2? Or will it work for both?

TR
TR's picture
Online
Bug FinderFAQ ModeratorGetting busy with the Ubercode.
Joined: 11/05/2007
Juice: 3369
Re: What Version

Be aware that the fix described above will only work reliably when exactly one person is browsing your site at a time. If multiple people are making purchase at the same time, this fix can (and at some point will) fail in its goal to restrict the quantity sold.

A proper solution requires applying concurrent programming techniques and DB transactions to ensure thread-safe limitation of purchase quantities to stock available, and it won't be as simple as a few lines of code.

Concurrency becomes an issue when you are reading/modifying/writing information in the DB from multiple processes simultaneously. Any separation in the code between the reading and the writing opens the possibility that two independent processes can step on each other. (This situation also exists in software development, which is why we use CVS/Bazaar to manage teams of developers working with the same code). Most of Drupal/Ubercart never has to deal with concurrency, because most modules either simply display the current content of the DB (a read-only operation), or modify user- or process-specific information (i.e., operate on data not shared between processes). Stock control is an exception, hence the need for a more sophisticated solution.

<tr>.
Alaska's picture
Offline
Joined: 10/16/2007
Juice: 1433
Product Removal

TR:

Thanks for the great explanation. Looks like I will just stay with the present "sold out" message on the site. Thought that this would be a nice substitute, but will not chance it.

snicers's picture
Offline
Uber DonorInternationalizationizer
Joined: 09/20/2007
Juice: 192
Re: Product Removal

great!! thank you for sharing. realy appreciated!! it works like charm.

vancouverWill's picture
Offline
Joined: 01/22/2009
Juice: 8
Re: Re: Product Removal

Hi Are you using the rules PHP script or the inventory API? Having some reall problems getting this working with current Drupal version.

Thanks

Will

Clarkie28's picture
Offline
Joined: 01/27/2009
Juice: 12
Re: Re: Re: Product Removal

Just be aware using this module that if you only have stock monitoring turned on for SOME of your products, when someone buys a product that isn't monitored it will also be unpublished because its default stock level is zero.

This happened on one of our sites - any time someone ordered a product that wasn't stock monitored, when the checkout completed that product was then unpublished. We only noticed when there seemed to be very few products left on the site!

TwistedLincoln's picture
Offline
Joined: 04/06/2008
Juice: 128
Re: Automatically remove one-off products that have been sold?

What about a totally different approach:

Using Stock Manager with Attributes (http://drupal.org/project/uc_multi_stock) along with Attribute Stock Filter (http://drupal.org/project/uc_attribute_stock_filter) will allow you to disable the add to cart button for items that are out of stock (or at their threshhold). This immediately makes it impossible for customers to buy.

Why not have a cron job that sets any product with 0 stock as unpublished? That way the item is instantly unavailable when purchased, and the catalog is culled of unavailable products however often cron is set to run.

---------------------------
Twisted Lincoln, Inc.
www.twistedlincoln.com/shop

Jon_V's picture
Offline
Joined: 03/14/2009
Juice: 20
TwistedLincoln wrote:What
TwistedLincoln wrote:

What about a totally different approach:

Using Stock Manager with Attributes (http://drupal.org/project/uc_multi_stock) along with Attribute Stock Filter (http://drupal.org/project/uc_attribute_stock_filter) will allow you to disable the add to cart button for items that are out of stock (or at their threshhold). This immediately makes it impossible for customers to buy.

Why not have a cron job that sets any product with 0 stock as unpublished? That way the item is instantly unavailable when purchased, and the catalog is culled of unavailable products however often cron is set to run.

For the (Ubercart 2.0) store I'm building, I want to have both options - Some items are truly unique, and will never be in stock again. Others are replaceable and I would like customers to be able to see them, even when they are out of stock.

My way around this is to use the two modules mentioned here by TwistedLincoln for the replacable items, and the following for unique items:

I added a dropdown field using CCK to my products to define whether they are unique or not.

I then set up the following code as a conditional action for customer completing checkout:

foreach ($order->products as $product) {
  $nid = $product->nid;
  $node = node_load($param = $nid, $revision = NULL, $reset = NULL);
  $uniq = $node->field_uniq;

  if ( in_array ('Yes', array_values($uniq[0]) ) ) {
    db_query('UPDATE node SET status = 0 WHERE nid = %', $nid);
  }

}

I'm not very happy about using the db call there, but I couldnt find a drupal function that would actually work to do the unpublishing. The above works well for what I need.

Jon

--
Mirrorstone Crystals - UK crystal and fossil shop

jamesialford's picture
Offline
Bug Finder
Joined: 04/10/2009
Juice: 172
I need a little hand holding

I am new to Drupal, Ubercart, and PHP. I am totaly lost and have been for weeks now. Can someone hold my hand and help me with this.

I am using Drupal 6, Ubercart 2.

I have it so my registered users can add items for sale in my catalog. When the item sells I need it to be removed from my catalog. As it stands right now the item stays in the catalog and others can by it again.

gtin's picture
Offline
Joined: 09/04/2009
Juice: 18
Drupal 6.x Ubercart 2.x code

It took me about 2hrs to get this working with Drupal 6 and Ubercart 2.x. I could not it get to work because in Conditional Actions you are not supposed to use the php tags <?php around the code so that my action was never running. Once I got this removed from the original example I got it working with a few changes.

First of all, you have to do the following to get this working:
1) Create a new predicate that triggers when the customers complete checkout
2) Set the weight of this new predicate to 1 since the weight for the predicate that reduces the stock is set to 0
3) There is no need to add conditions to this predicate so go ahead and click on the Actions tab
4) Paste the following code:
foreach ($order->products as $product) {
if ((uc_stock_level($product->model) - $product->qty) <= 0) {
$node = node_load($param = $product->nid, $revision = NULL, $reset = NULL);
node_unpublish_action($node);
node_save($node);
//db_query('UPDATE {node} SET status = 0 WHERE nid = %d', $product->nid);
}
}
5) Save the predicate and you are done

In Step 4 you can either use the node apis to Load, unpublish, and save the node or you can comment it out those lines and use the db_query that is commented out. I would imagine that the db_query is more efficient since it does not load the node and it does less instructions but since I am new I am not sure if using the apis would be best practice in drupal rather than updating the database directly.

jamesialford's picture
Offline
Bug Finder
Joined: 04/10/2009
Juice: 172
Re: Drupal 6.x Ubercart 2.x code

I have tryed to complete the setps several times. I keep getting this error when I complete the check out.

Fatal error: Call to undefined function uc_stock_level() in /home/content/r/i/c/rickschell/html/Store/modules/ubercart/ca/ca.ca.inc(516) : eval()'d code on line

any thoughts?

James

gtin's picture
Offline
Joined: 09/04/2009
Juice: 18
Re: Re: Drupal 6.x Ubercart 2.x code

I have no idea why it is not working for you. Do you have stock module enabled in ubercart - extra section?

jamesialford's picture
Offline
Bug Finder
Joined: 04/10/2009
Juice: 172
No I don't

I do not have the stock module enabled. Do I need it enabled?

gtin's picture
Offline
Joined: 09/04/2009
Juice: 18
Re: No I don't

yes you need to enable it for a product to run out of stock. this function uc_stock_level you are getting an error on belongs to the stock module.

jamesialford's picture
Offline
Bug Finder
Joined: 04/10/2009
Juice: 172
Enabled it

I have enabled it and everything is working. Thanks for your help

jasonabc's picture
Offline
Uber Donor
Joined: 05/05/2008
Juice: 573
Re: Drupal 6.x Ubercart 2.x code

awesome - thanks very much for this Gtin - works a treat. Hopefully we'll be able to set this up simply using CA soon - this really should be built in by default.

Alaska's picture
Offline
Joined: 10/16/2007
Juice: 1433
Product CA

Gtin:

Thanks for the how to, using conditional actions to unpublish a product from the catalog. Added to the live site and it works well. Also using product min/max to limit the purchase to one product.

To reach conditional actions go to admin/store/ca. Attached are a number of screen shots to assist anyone that may be having issues with implementation.

Also using only the database call. Seems simpler and less code to get the job done. Also needed to set the weight to 2 as there was another predicate using 1.

In order to test it will be necessary to complete checkout which will not happen using a localhost Wamp server set for PayPal. To test, go to modules and activate the 'payment method pack'. Then in admin/store/settings/payment/edit/methods add Check. When testing, choose Check for your payment method. If the purchased product is removed form the catalog when the order is process then you have been successful. Then go back and remove Check if it is an unwanted payment method.

Thanks so much for the code and the step by step.

AttachmentSize
ca_1.png 19.83 KB
ca_2.png 27.13 KB
ca_3.png 32.22 KB
ca_4.png 6.51 KB
ca_5.png 21.89 KB
jasonabc's picture
Offline
Uber Donor
Joined: 05/05/2008
Juice: 573
Alaska wrote: Thanks for the
Alaska wrote:

Thanks for the how to, using conditional actions to unpublish a product from the catalog. Added to the live site and it works well.

Agreed this works well - but it does not work for products with attributes. If one of my options gets set to zero at checkout - the product is unpublished (regardless of stock levels of other items). Anyone got a fix for this??

Alaska's picture
Offline
Joined: 10/16/2007
Juice: 1433
Attributes

In my case there are no attributes, so the script does what it should.

Did notice, but did not keep a record, that there are one or two modules that deal with attributes and will remove an attribute if that stock level is low. i.e. you have red and green shirts - out of green and the green attribute goes away.

chourmovs's picture
Offline
Joined: 02/22/2009
Juice: 52
finally there !!! thank you

finally there !!!
thank you very much

j.mead's picture
Offline
Joined: 07/27/2009
Juice: 385
Re: finally there !!! thank you

A question to all before I try to implement this...

If the item is unpublished how are you dealing with a situation where a customer wants to go back later and view the item. If it's no longer published than doesn't it return a 404 error when they try to find it? It will still be seen in their order history but confusing customers by removing items completely from their view is bad with regards to customer service.

For me I would prefer to have an item simply assigned a key word that designates out of stock so it doesn't get displayed in other categories. I already have my stock managed so people can't buy more than what's available, but many items get replenished so I don't want to completely hide it from them. Once more quantity becomes available, it's no issue to manually reset the item's category. Any one got an idea if the code snippets above can be modified to achieve this or any ideas towards this goal?

the sites i'm always breaking.... www.sew-la-fabric.com
http://lostpetsla.com (though i hope i never break this one too bad)

jasonabc's picture
Offline
Uber Donor
Joined: 05/05/2008
Juice: 573
Re: Re: finally there !!! thank you

If an item is unpublished I get a "Access denied. You are not authorized to access this page. " message. I do see what you're saying about pulling content out of UI that already show up in order history and carts but a lot of my clients have a large product line and once an item has sold out it's gone forever and they want it off the site completely. Otherwise it's searchable, they get questions about it and it just becomes a pain. I think having the option *somewhere* to automatically unpublish a product once stock reaches zero is a necessity. If people want to use it/set it up they can. A lot of my clients want this option, some others do not - but at least it would be nice to have the option to set it up either way.

cheers

Jason

wireyourworld's picture
Offline
Joined: 04/07/2010
Juice: 65
Can someone give me a step by step on this?

This thread is REALLY confusing. I, like many, would like one offs that sell to be unpublished. However, if that can't be accomplished using a simple tested and functional module then I'll be ok with a gray "sold out" button.

This thread goes from 2008 to now. It twists and turns and refers back to past posts and the bottom line is: I need someone to tell me exactly, which mods or contributions do I need to have installed and enabled. What code goes where. Is there a db query I need to do or what that an old version? If so, how? I tried the post of gtin on 9/07/09 but am lost as to the last part "in step 4 you can either use the node api...." I don't know what any of that sentence means or even if that post is currently the best method to use. I tried the rest but it didn't do anything to gray out the sold out item. I have the stock module installed, I have product min/max installed and set for the item I'm testing. I think its set right. I also have Restrict Qty on the item so no more can be added while in cart view. I suspect the problem may be with whatever gtin is saying about step 4, but I guess I need an explanation of the explanation. And I'm certain I'm not the only one!

Thanks in advance!

jasonabc's picture
Offline
Uber Donor
Joined: 05/05/2008
Juice: 573
Re: Can someone give me a step by step on this?

the trouble with GTIN's post (http://www.ubercart.org/forum/support/7177/automatically_remove_oneoff_p...) is that it doesn't take into account product attributes. It just looks at the overall stock. If any one of your attributes is zero - the code executes and unpublishes the node - regardless of stock levels of the other attributes. So it's unusable for me. I'm looking for this also so would welcome any input from other users.

chourmovs's picture
Offline
Joined: 02/22/2009
Juice: 52
Re: Automatically remove one-off products that have been sold?

yes the only explanation of the lack of such a simple feature over the ages is a competion with attribute feature
single item seller don't care about attribute !!

maybe we need a special build of ubercart

wireyourworld's picture
Offline
Joined: 04/07/2010
Juice: 65
Re: Re: Automatically remove one-off products that have been sol

I have single items but I also make items that can be customized for the customer, like choice of birthstone colors for example, like http://www.wireyourworld.com/content/ear-pins-sweeps-vines-14k-gold-fill... . But items that can be customized are made to order and never go out of stock. Since I've been selling on venues versus my own site though, I've created some items like that and listed each color separately. Not sure if I'll do that on my own site or try "attributes". I do like the way each separate choice shows up in google if someone is searching that birthstone though. Don't know how well SEO will work to pick up only one product with attributes if I do it that way. I'm working on learning all my Drupal SEO mods today. I suppose metatags etc will compensate some. Wonder also if I could embed a slideshow of all the attribute photos in the one listing to show the examples.... but thats a separate topic and not todays task!

On topic though I found the uc_out_of_stock, uc_restrict_qty and uc_product_minmax work to keep the customer from even trying to up the quantity in a one off in the cart, and turns the purchased item into out of stock in the main catalog. Some of the features of out of stock are bothersome. See example here http://www.wireyourworld.com/catalog/22 The Throbber dohicky showing on the buttons was unattractive and uneeded so I dumped it. The phrase Out of Stock on the button doesn't fit the button and is black so is a little hard to read on my dark orange buttons, the button itself is not grayed, I tried using firebug to fix the font color but it turned out to be the main color for text on my site, so no go. There is probably a way to fix the text and the fact it doesn't fit the button, but its beyond my knowledge at the moment. When I made the text smaller the button itself got smaller and since I don't want the entire test of my site smaller, again no go. Ah well, sold one offs will be unpublished by me as soon as I can get to my computer to do that so the unattractiveness won't be there too long. Would actually prefer something like SOLD in text with no button at all. Not SOLD OUT as one offs will never be in stock again.

But yeah, where's the brilliant geek to fix all this? Smiling

kazah's picture
Offline
Joined: 08/04/2010
Juice: 19
Automatically remove one-off products that have been sold?

Hi,

I would like to know is it possible not to show only options that are sold and to make other options available?

For example, t-shirt (sizes: 1,2,3).... the "1" size is sold and out of stock and to make it unavailable to choose but other options is not out of stock and are choosable!!

Someone help plz!!

fehin's picture
Offline
Joined: 12/17/2008
Juice: 151
Re: Automatically remove one-off products that have been sold?

I need this too. Subscribing.