Unpublished prioduct variant still displayed
11 years 4 months ago #202290
by iedwards
Unpublished prioduct variant still displayed was created by iedwards
-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.4.1
I have products with variants, if I unpublish some of these variants they are still displayed in the front end.
Ian
-- Joomla version -- : 3.4.1
I have products with variants, if I unpublish some of these variants they are still displayed in the front end.
Ian
Please Log in or Create an account to join the conversation.
11 years 4 months ago #202297
by Xavier
Replied by Xavier on topic Unpublished prioduct variant still displayed
Hi,
All the possible values are listed but a message saying that the product is not available is displayed on unpublished variants.
It is working this way because, when there is many characteristics attached to a product we have to list the dropdowns to allow the combinations between the characteristic values.
But if you want, you can select another way of displaying the variant selection in the configuration of HikaShop.
All the possible values are listed but a message saying that the product is not available is displayed on unpublished variants.
It is working this way because, when there is many characteristics attached to a product we have to list the dropdowns to allow the combinations between the characteristic values.
But if you want, you can select another way of displaying the variant selection in the configuration of HikaShop.
Please Log in or Create an account to join the conversation.
11 years 4 months ago #202414
by iedwards
Replied by iedwards on topic Unpublished prioduct variant still displayed
Hi Xavier,
I'm afraid I don't really understand your answer.
I am not seeing a message for unpublished variants, and I don't have any drop downs, I am using a customised template but I don't think I've removed anything to do with that.
I am using List view for variants and if a variant is unpublished convention suggests it shouldn't be visible, and that's how I was expecting it to work.
Regards,
Ian
I'm afraid I don't really understand your answer.
I am not seeing a message for unpublished variants, and I don't have any drop downs, I am using a customised template but I don't think I've removed anything to do with that.
I am using List view for variants and if a variant is unpublished convention suggests it shouldn't be visible, and that's how I was expecting it to work.
Regards,
Ian
Please Log in or Create an account to join the conversation.
11 years 4 months ago #202420
by Xavier
Replied by Xavier on topic Unpublished prioduct variant still displayed
Hi,
When using the option "list" to list the variants, an unpublished variant shouldn't be displayed.
I just tried on my local and it is working as expected.
Do you have edited the view "product / show_block_characteristic" ? If it is, please backup it and try with the default view.
When using the option "list" to list the variants, an unpublished variant shouldn't be displayed.
I just tried on my local and it is working as expected.
Do you have edited the view "product / show_block_characteristic" ? If it is, please backup it and try with the default view.
Please Log in or Create an account to join the conversation.
11 years 4 months ago #202567
by iedwards
Replied by iedwards on topic Unpublished prioduct variant still displayed
I have over ridden the templates, I'll check I haven't broken anything.
Thanks,
Ian
Thanks,
Ian
Please Log in or Create an account to join the conversation.
11 years 4 months ago #202572
by nicolas
Replied by nicolas on topic Unpublished prioduct variant still displayed
The unpublished/out of stock variants won't display on the list of the product page if the "show out of stock products" setting of the HikaShop configuration is turned off so make sure that it is the case.
Please Log in or Create an account to join the conversation.
11 years 4 months ago #202641
by iedwards
Replied by iedwards on topic Unpublished prioduct variant still displayed
Ok, I do have "show out of stock products" turned on, but would consider out of stock and unpublished as being different things. In my case I want to show products that are published and out of stock, but I don't want to show products that I haven't published.
Ian
Ian
Please Log in or Create an account to join the conversation.
11 years 4 months ago #202662
by nicolas
Replied by nicolas on topic Unpublished prioduct variant still displayed
That's how it works for products.
Variants should indeed work like that too.
I've reproduced the issue on my end and found the origin and added a patch which will be in next version of HikaShop for that.
You need to add the code:
after the code:
in the file administrator/components/com_hikashop/classes/product.php and that will fix it in the mean time.
Variants should indeed work like that too.
I've reproduced the issue on my end and found the origin and added a patch which will be in next version of HikaShop for that.
You need to add the code:
Code:
if($name=='product_published' && $variant->$name==0){
continue;
}
Code:
if($name=='product_quantity' && $variant->$name==0){
continue;
}
The following user(s) said Thank You: iedwards
Please Log in or Create an account to join the conversation.
11 years 4 months ago #202712
by iedwards
Replied by iedwards on topic Unpublished prioduct variant still displayed
Thank you Nicolas, I have included that and unpublishing variants now works fine.
Ian
Ian
Please Log in or Create an account to join the conversation.
Time to create page: 0.177 seconds