- Posts: 377
- Thank you received: 7
Disallow unpublished variants
for some reason if I unpublish a variant of a product or even delete it i am still able to select it on the drop downs, the popup message comes up saying i have successfully added this to my cart and it is only when i navigate to the cart that it says that i cannot have this product in my cart when the product variant isn't even supposed to exist as i deleted it.
Is there a way i can get it to display this message on the popup so instead of saying, this has been successfully added to your cart it should say 'this combination is not available' or something along those lines? The ideal scenario would be that the drop down filters what can be selected as each option is selected so that people can't even get to the variant option however i dont know how hard this would be to implement?
Thanks
Alex
Please Log in or Create an account to join the conversation.
Can you provide a link to the product page with the issue with a screenshot of your product's variants listing and provide your HikaShop version so that we can see what you did ?
Please Log in or Create an account to join the conversation.
Below on this page i should not be able to select the size 85x55 two sided in 500 qty.
I have the display add to cart for free products set to none and the display out of products set to no.
I have attached the variant screen shot showing this variant is unpublished however it is still selectable and the popup says that it has been added to the cart.
hexaprint.co.uk/print-product/429-300gsm-art-board-coated.html
Kind regards
Please Log in or Create an account to join the conversation.
That's because you commented out some of the HTML on the show_default view file. That HTML is used to swap the add to cart button of each variant when you change the characteristics selection. If you comment it out, the add to cart button area is not swapped anymore. Also, because of that, when you click on the add to cart button, it always add the default variant to the cart, regardless of the characteristic selected.
Please Log in or Create an account to join the conversation.
Thanks
Alex
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
I think that you'll maybe find a solution through this thread :
If you have 2 characteristics for your product, and that you want to hide one value of this characteristic for your product, you'll have to :
- Unpublish every variant of your product which this characteristic value
- Set the Display out of stock products option to NO
Please Log in or Create an account to join the conversation.
I believe this is what i did already. I unpublished the variant i didnt want to show and then set the display out of stock products to no and have even disallowed wishlist. However i can still see the product and i can click on add to wishlist. Please see attached...
I think quite simply i shouldnt be able to select it from the dropdown if i have unpublished it in the backend. I have even deleted one of the variants and it still shows up. (85x55 one 500)
Thanks
Alex
Please Log in or Create an account to join the conversation.
If the add to wishlist button is displayed, it means that you have some of the options of the wishlists turned on in the configuration. Please make sure that you turn them all off.
Please Log in or Create an account to join the conversation.
I have managed to hide the qty field ok thanks.
I am still having no luck with hiding the unpublished variants. I have set all wishlist options to no and have unpublished the variant however i am still have to select it. Please see screen shots of my config, the variant and the product page, sorry this isn't making much sense to me, the wishlist option is quite obviously set to be disabled when it is still displaying on the front end..
Thanks
Alex
Please Log in or Create an account to join the conversation.
I know that we made some hot fixes in the wishlists for HikaShop 2.2.2, so depending when you download HikaShop, it could be helpful to re-download it.
Kind regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
After re-installing 2.2.2 this now hides the wishlist button which is great. For some reason however one of the variants i deleted still shows in the drop down, surely this is not correct? The variant i deleted is 85x55 one sided 500 however it can still be seen on the front end.
Thanks
Alex
Please Log in or Create an account to join the conversation.
To hide the wishlist button when the variant is unpublished, you can edit the view "product / quantity" via the menu display > Views and replace the code:
Please Log in or Create an account to join the conversation.