3
Answers
Vote up!
0
Vote down!

Ordering: How to redirect to e-mail for order request when stock is zero?

Currently my add to cart label changes to orange and the text becomes 'made to order'. The stock is zero and so an item is logically not added to the cart.

- I want to redirect a potential buyer to the contact page
- the contact page is then populated with the SKU number
- potential buyer can then say 'I am interested in this, can you make this? etc etc'.

The add to cart label never shows 'out of stock', it is an art shop and items are usually made on request. If they are available on the site then of course it can be bought on the site.

Has anyone any idea how to redirect potential buyers to a contact paged via the add to cart label when the stock count is zero?

Rob
Asked by: Rob
on October 11, 2014

3 Answers

Vote up!
1
Vote down!

I found this hint on drupal.org

- Edit the rule or work on a copy of "Stock: disable add to cart"
- Replace the action "Set the state of the add to cart form" with "Advanced configuration of the add to cart form"
- Set the "stock action" field to "Custom HTML" and the "Custom HTML" field to something like Out of stock (can be any valid HTML)

Optionally set the "stock action" field to "URL Action" and the "Custom URL" field to a valid url. You can also set the "stock action" field "Custom submit" to trigger a custom submit (will need coding for you submit handler)

thanks to guy_schneerson (https://www.drupal.org/node/1140234)

It does work, if a product is out of stock then the add to cart button disappears and the url to 'contact page' appears with bespoke text. However, the next step is to have the SKU or product id in the subject field.

Rob
Answer by: Rob
Posted: Nov 17, 2014
Vote up!
1
Vote down!

For those looking for the same solution, use the SKU token (in rules, in advanced cart configuration in 'custom url') and add "[site:url]webform/product-queries?subject=Query about [commerce-product:sku]"

If a product visible in the product display or product details is out of stock then it does not show 'out of stock' but shows another message. Upon selecting it starts an email step adding the sku from the current content as a pre-populated query to the show keeper..

Rob
Answer by: Rob
Posted: May 22, 2015
Vote up!
1
Vote down!

For those looking for the same solution, use the SKU token (in rules, in advanced cart configuration in 'custom url') and add "[site:url]webform/product-queries?subject=Query about [commerce-product:sku]"

If a product visible in the product display or product details is out of stock then it does not show 'out of stock' but shows another message. Upon selecting it starts an email step adding the sku from the current content as a pre-populated query to the show keeper..

Rob
Answer by: Rob
Posted: May 22, 2015