Our store does not track inventory - wondering if there is any way to manually remove the add to cart button & display an out of stock message w/o enabling inventory tracking?
Disable add to cart w/o tracking inventory
Collapse
X
-
There are many ways to accomplish this. How you go about it really relies on how you want to maintain the out-of-stock data and how comfortable you are with updating template code.
If you are deadset on implementing a manual Out Of Stock system, be sure to implement it everywhere a customer can add that product to their cart on your website, not just the product page.
At a high level, if I were to build a manual Out of Stock system, I would start with a new product checkbox custom field called "OutOfStock" and include that custom field on the templates that need to have the buy button toggled. Then within template code wrap your add to cart buttons with an mvt:if. Something like:
<mvt:if expr="l.settings:product:customfield_values:custom fields:outofstock">
// out of stock messaging
<mvt:else>
//add to cart code
</mvt:if>
This would allow you to check a custom field and toggle between Out of Stock and Add to Cart.
-
There might be an easier way to do this. For items that you want to take out of stock (and only for those items), you can set the product to track inventory and set inventory to 0. All other items will not be tracking inventory. If a customer attempts to add one of these products to the cart, they will get the out of stock page where you can customize the messaging. Alternately, you could modify the template code on the PROD page by wrapping the add to cart button with a conditional statement (just as kocourek mentions) saying that if inventory equals 0 do not show the button but display the message you want.Todd Gibson
Oliver + S | Sewing Patterns for Kids and the Whole Family
Comment
-
Upvote to you oliverands I agree with turning on inventory only for products that you want out of stock. It is simpler to maintain and a better approach overall.
Comment
-
This sounds like it would be a great solution, thanks for the replies! I wasn't aware you could track inventory on the product level where do you enable this?Originally posted by oliverands View PostThere might be an easier way to do this. For items that you want to take out of stock (and only for those items), you can set the product to track inventory and set inventory to 0. All other items will not be tracking inventory. If a customer attempts to add one of these products to the cart, they will get the out of stock page where you can customize the messaging. Alternately, you could modify the template code on the PROD page by wrapping the add to cart button with a conditional statement (just as kocourek mentions) saying that if inventory equals 0 do not show the button but display the message you want.
Comment
-
Turn on track inventory at a store level Catalog > Inventory > Inventory Settings. This is where you'd set your global out-of-stock messaging as well. Then on each product, there will be an inventory tab where you can toggle "Track Product". If you have a lot of products, inventory tracking at a product level can be updated using MIVA's data management. "Add/Update Products from CSV"
Comment
-
I was trying to avoid turning on global inventory tracking. If I do enable it does MIVA default to having it turned on or off for products?Originally posted by kocourek View PostTurn on track inventory at a store level Catalog > Inventory > Inventory Settings. This is where you'd set your global out-of-stock messaging as well. Then on each product, there will be an inventory tab where you can toggle "Track Product". If you have a lot of products, inventory tracking at a product level can be updated using MIVA's data management. "Add/Update Products from CSV"
Comment
Comment