Is there an ability to have the button display Sold Out when the Inventory level is 0?
Announcement
Collapse
No announcement yet.
PROD Page Sold Out button
Collapse
X
-
PROD Page Sold Out button
Leslie Kirk
Miva Certified Developer
Miva Merchant Specialist since 1997
Previously of Webs Your Way (aka Leslie Nord leslienord)
Email me: [email protected]
www.lesliekirk.com
Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr
Tags: None
-
When I've done this, in Iron and Wool RT, I needed to play around with the functions in "scripts.js" (I think it was). But, it might have also required some JQuery on the PROD page.
There is other background. It was a more complex integration scenario with my WAITLIST module that needed to work much like swatch-style functions. Maybe all you need to do is a conditional that will replace the button when inventory is zero. As we all know, it's rarely that simple though aye?
Scott
Need to offer Shipping Insurance?
Interactive Design Solutions https://www.myids.net
MivaMerchant Business Partner | Certified MivaMerchant Web Developer
Competitive Rates, Custom Modules and Integrations, Store Integration
AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
My T-shirt Collection is mostly MivaCon T-shirts!!
-
Originally posted by ids View PostWhen I've done this, in Iron and Wool RT, I needed to play around with the functions in "scripts.js" (I think it was). But, it might have also required some JQuery on the PROD page.
There is other background. It was a more complex integration scenario with my WAITLIST module that needed to work much like swatch-style functions. Maybe all you need to do is a conditional that will replace the button when inventory is zero. As we all know, it's rarely that simple though aye?
ScottLeslie Kirk
Miva Certified Developer
Miva Merchant Specialist since 1997
Previously of Webs Your Way (aka Leslie Nord leslienord)
Email me: [email protected]
www.lesliekirk.com
Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr
Comment
-
Nothing comes baked into Shadows to toggle a text change when a product/variant is out of stock. Instead, the default functionality of setting the button to disabled takes place. Having the ability to change the text has been added to the list of possible extension. https://github.com/mivaecommerce/Extensions/projects/1Matt Zimmermann
Miva Web Developer
Alchemy Web Development
https://www.alchemywebdev.com
Site Development - Maintenance - Consultation
Miva Certified Developer
Miva Professional Developer
https://www.dev4web.net | Twitter
Comment
-
Can't you use something like this?
<mvt:if expr="l.settings:attributemachine:product:inv_avai lable EQ 0">
<input class="c-button c-button--full c-button--huge u-bg-gray-40 u-color-white u-text-bold u-font-small u-text-uppercase" data-action="&mvte:urls:BASK:auto;" data-hook="add-to-cart" data-value="Add To Cart" type="submit" value="SOLD OUT">
<mvt:else>
<input class="c-button c-button--full c-button--huge u-bg-gray-40 u-color-white u-text-bold u-font-small u-text-uppercase" data-action="&mvte:urls:BASK:auto;" data-hook="add-to-cart" data-value="Add To Cart" type="submit" value="Add to Cart">
</mvt:if>
Not sure if you're looking for something more robust.
Comment
-
Unfortunately, that would only work for products not using attributes since the MVT statement will only run on page load.Matt Zimmermann
Miva Web Developer
Alchemy Web Development
https://www.alchemywebdev.com
Site Development - Maintenance - Consultation
Miva Certified Developer
Miva Professional Developer
https://www.dev4web.net | Twitter
- 1 like
Comment
-
Originally posted by Matt Zimmermann View PostNothing comes baked into Shadows to toggle a text change when a product/variant is out of stock. Instead, the default functionality of setting the button to disabled takes place. Having the ability to change the text has been added to the list of possible extension. https://github.com/mivaecommerce/Extensions/projects/1Leslie Kirk
Miva Certified Developer
Miva Merchant Specialist since 1997
Previously of Webs Your Way (aka Leslie Nord leslienord)
Email me: [email protected]
www.lesliekirk.com
Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr
Comment
-
Hi Leslie,
The Legacy ReadyThemes, like Levels, usually came with a JavaScript function for his. Look in you scripts.js file for Update Button For "Out Of Stock".Matt Zimmermann
Miva Web Developer
Alchemy Web Development
https://www.alchemywebdev.com
Site Development - Maintenance - Consultation
Miva Certified Developer
Miva Professional Developer
https://www.dev4web.net | Twitter
Comment
-
Hi Matt,
In previous Readytheme, there is a function under the jsPROD to listen to events . Do we have this in the new Shadow Readytheme? I like to implement the WAITLIST the same way. If not, any recommendation on how to incorporate the WAITLIST function into the Prod page?
MivaEvents.SubscribeToEvent('variant_changed', function(product_data) {
gallery.length = 0;
mainImageZoom.attr('data-index', 0);
thumbnailIndex = 0;
updateWaitlist(product_data);
inventoryMessage();
outOfStock();
selectedSwatch();
});
Comment
-
While Shadows doesn't ship with that function included in the theme.js file, you can add it and it will work as expected.
Code:MivaEvents.SubscribeToEvent('variant_changed', function (product_data) { /* Your Code Here */ });
Matt Zimmermann
Miva Web Developer
Alchemy Web Development
https://www.alchemywebdev.com
Site Development - Maintenance - Consultation
Miva Certified Developer
Miva Professional Developer
https://www.dev4web.net | Twitter
Comment
Comment