Return to default when variant is unpublished

  • Posts: 18
  • Thank you received: 1
11 years 11 months ago #80784

What I am trying to do is create a "preorder" functionality. Customers will still pay immediately. The only difference between ordering a product and its preorder variant is the price and the length of time before the customer will receive it.

What I have done is set up a "Preorder Status" characteristic with only one value ("Preorder"). And on the product configuration page, I created a variant with that characteristic, and a different price, quantity, and product ID. When this variant is published, everything works great. The variant's price and quantity are displayed. When it is unpublished, what I would like to see is that the price returns to the default price of the product, and the stock returns to the default stock level. Instead it says that there are none in stock, the price is still the preorder price, and the drop down with "Preorder" is still visible.

Example of what I would like to happen: I have 1000 of Product1 (future stock) for $10. I would like to allow 200 of Product1 to be ordered before I physically have the product, for $5. The product code is different (Product1-P). As soon as those 200 are sold or as soon as I physically have the product (whichever comes first) the preorder period is over, and Product1 is now displayed at price of $10 and without the "Preorder" characteristic being shown any longer. The stock level should now be at 800.

Am I going about this the wrong way? It could be done with two different products, but that would be much more work.

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 11 months ago #80828

Hi,

What you can do is a another value for the characteristic "Preorder", for example "Normal". Set the pre-order as default value. And click on manage variants in the product edition page, and disable the option "Normal" when you are in "Preorder" and disable preorder - enable normal when you are in normal mode and change the default one in the product edition page.

By this way you can set a different quantity for the preorder or normal stock, but you will have to change enable/disable manually.
Then replace the translation for "No stock" to something else, like "Not available" or edit the view "product / listing_price" to add a check on the type displayed, for example if preorder and no more preorder, display "No more Preorder, select Normal".

Please Log in or Create an account to join the conversation.

Time to create page: 0.084 seconds
Powered by Kunena Forum