Anyone have any ideas as to why the "Add to Cart" ...
# suitecommerce
t
Anyone have any ideas as to why the "Add to Cart" button would not appear on some items and show on similar items. I looked at the item record in NetSuite and nothing appears to be different for the item the button does not show on vs the item the button does show on. The only difference is the Qty Available, but that should not make a difference. Tried clearing cache, but still no button.
s
Personalized Catalog Views – the item is part of a mapping that's marked as "Disable Purchase" and the user is not part of a customer segment that purchase it
Basically, the app will hide the button if the item model tells it to, which is defined by the
_isPurchasable
variable. If you look at the item API response, you'll see a few properties related to purchasability.
t
Thanks Steve, but how do I fix the issue, where do I locate the "Disable Purchase", and currently there is no user, as I am not logged in to the site. I appreciate any help you can provide.
s
Anonymous users can still be used in the configuration for PCV
Commerce -> Marketing -> Customer Segments Manager in the menu
You could have something like this
t
I will take a look at the document you sent, but I checked our settings and this is what we have. But what I do not understand, is the item that is missing the button is the same type of item that has a button,
s
Is your site public and can you share a link?
t
Yes, here is the link to the item missing the button, https://www.todaysdesignhouse.com/cultured-white-marble-19-inch-vanity-top and here is the link to a similar item that has the button https://www.todaysdesignhouse.com/cultured-white-marble-49-inch-faucet
s
It is out of stock 🙂
I know it says "quantity available: 17" but that appears to be a customisation. The API response says it is out of stock, and that is what is causing the button to be hidden (https://www.todaysdesignhouse.com/api/cacheable/items?c=5274210&country=US&currency=USD&f[…]5&url=cultured-white-marble-19-inch-vanity-top&use_pcv=T)
quantityavailable
is 0
t
That is a customization that we had ACS do for us, I will have to reach out to them.
s
Yes. I was going to say that you need to figure out why there is a discrepancy.
t
Thank you so much for all your help with this. I really need to get better and troubleshooting these things and to learn the tools, just do not have time
s
No problem. For your reference, I looked at: • I looked up what template in the theme displays the Add To Cart button (cart_add_to_cart_button.tpl) • I looked up what variable controls its visibility (isCurrentItemPurchasable) • I looked up what sets that variable in the view (this.model.getItem().get('_isPurchasable')) • I looked up what sets that value in the Item Key Mapping (_isPurchasable -> ispurchasable) • I looked up in the API response what this value was • I checked the related object and saw this:
Copy code
ispurchasable_detail: {
inpersonalizedcatalog: true,
bystockavailability: false
}
From that we can assume that the item is out of stock, and I can see else where in the response that the
quantityavailable
is 0
f
Hi @Todd Juenemann There are two extensions performing additional calculations to
quantityavailable
to return the final number to display in the website (ACS.OutOfStockMessage.1.0.1 and MHI.QuantityAvailable.1.0.1) In this case it is an assembly item so per the code on your website the one impacting this seems to be MHI.QuantityAvailable.1.0.1 As Steve mentioned PCV works with out of the box functionality to determine stock which is
quantityavailable
t
Thanks for the info @Flo, can I ask in screen shot 1, what is that tool your using, and how do I access that?
s
It's just the Chrome developer tools. Press F12 or right-click -> Inspect
t
Thanks, that is what I was thinking, but wanted to see if there was a better tool out there.
👍🏻 1