alternative to out of stock message is button to reserve the product

danielhonrade - November 5, 2009 - 09:32
Project:Ubercart Out of stock Notification
Version:6.x-1.4
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

I am modifying your code to change the button to "Add to Reserve", because my client is also putting products that are out of stock for the meantime but buyers can already ask for reservations if the product becomes available, then it turns into a sale, what I did is just a hack but I know you can do a lot better for this option

AttachmentSize
1_client_product_view1.png57.1 KB
invoice_with_reservation.png50.34 KB

#1

ikeigenwijs - November 26, 2009 - 08:45

Could you post how you do it?
I need exactly the same thing
So i can draw lists of orders and reservations.

thx

#2

danielhonrade - November 27, 2009 - 01:45

hi, for now, the codes aren't clean, but i'll tell you how, for the button to change to something else, just open the uc_out_of_stock.js and you'll find the codes: (you have to comment this out)

$("input:submit.node-add-to-cart,input:submit.list-add-to-cart", form).hide();
$(".uc_out_of_stock_html", form).html(html);

this is hiding the button, all you need to do is to change this button to something else like the one i did:

$("input:submit.node-add-to-cart,input:submit.list-add-to-cart", form).attr('value','Reserve Only').attr('title','Reserve this product now. And, you will be notified as soon as its available.').after('This product is out of stock.');//changes - daniel

for the "for reservation" info to appear on the product page or on the receipt, just create an attribute of the product, the rest are actually just configurations of ubercart.

if the author of this module doesn't respond to my request, I'll be happy to make to this into a module, hope this helps you.

#3

ikeigenwijs - November 27, 2009 - 11:52

thx for the fast responce.
we want to do it the other way around.

We have products with limited stock.
sell them
and if the stock is depleted the costumers can still 'buy' the product but should be put on a waitinglist.

an other solution would be to make a waithinglist product and let the out of stock link to that but than you dont know for witch product ther on the waitinglist/reservation.

adding attributes is not an solution unles you can use views for populating the attributes so its depended on date and modify itself over time.

A form field with a list of all nodes is an other solution but i dont know how to do that eater.
Could you help me?

thx in advance

#4

danielhonrade - November 28, 2009 - 06:06

hi, the purpose of the reservation is actually putting the clients in
a list of orders with reservation attributes, the out of stock module
is dependent on the stock level which must be turned on, now depending
on the value of stock number the button changes, the attribute is also usefull on condition and action, you just have to configure the condition and action to notify the client or yourself if
the order status changes or attribute changes, there are a lot of
thing you can do with ubercart like conditions and actions. If you
want the clients to pay on reservation that's up to you. Just examine
the power of this condition and action in ubercart carefully, you
might find the answer there.

 
 

Drupal is a registered trademark of Dries Buytaert.