Hi there.
I don’t seem to manage to make the product category link to the product category of the actual product imaged on a WC single page. Can you please help me? See image.
Thanks.
Hi there.
I don’t seem to manage to make the product category link to the product category of the actual product imaged on a WC single page. Can you please help me? See image.
Thanks.
Hello @nblund,
Thanks for writing to us.
I checked your site it seems the category link is working fine at the moment. I would suggest you please clear your browser cache and then check it again. In case you want to insert the category link on the product image, I would suggest you please add an Image element then you need to call the dynamic content code for the product image({{dc:woocommerce:product_image}}
) and product category URL({{dc:woocommerce:terms_url}}
).
Hope it helps
Thanks
Thanks @prakash_s,
I can’t replicate what you are seeing although I emptied cache (sytem and browser). When hitting the product category link on the product page I get a random listing (equivalent to the shop page random listing). If I change the link URL from {{dc:archive:url}} to {{dc:woocommerce:terms_url}} then the same link directs me to /legal page.
For your information, on the shop page, if I enter a search term, the listing will indeed show the right ‘category’ of items.
Thank you very much for your help.
Hello @nblund,
I could not replicate your issue. When I visit a product and click the product category, it goes to the correct category link that has been assign to the product.
Please see the my video screencast here:
Do you have a preferred category to which the the product should be link to? Please give further clarifications.
Thank you.
Thanks very much @ruenel,
Yes, the product category link leads to the product category (url), but the items displayed under that category was not right. This was due to a Looper Provider with orderby=random, which was set because it is important that the first display of products on the shop page is random. Can I solve the about somehow - i.e. maintaining random display, but show the right products once a product category is selected? Perhaps by using two different layouts?
Can you point me in a direction, please?
Hello @nblund,
I checked your product category page it seems that the product is running fine at the moment. Please have a look at the given screenshot below in the secure note. In case you want to change the product order, I would suggest you create a custom layout for the product category page.
Thanks
Hi again,
The reason it works is that I removed the looper provider with the orderby=rand. But as you know I need the order to be random when the user first visits the shop page. So I need to make another wc archive to appear when a category is chosen (i.e. after the user visits the shop the first time). I am not sure how I set the condition (image) so the archive does not display in the first run, but appears when either user selects a category or performs a search. I miss a conditions like ‘Product Category = Any’. Can I alternatively set a condition where the random display would be shown in the first page visit only, or … ?
Thanks.
Hello @nblund,
Please be advised that the proper way of creating a WC Archive is by not having a Looper Provider. You only need the Looper Consumer because the Shop Index or any other archive has its own loop. WordPress and WooCommerce dynamically generate the post or product items in a chronological order. If you want to order of the Product items, you can go to Appearance > Customize > WooCommerce > Product Catalogue > Default product sorting. And if you want to have a random order for users who are not logged in, you will need a custom PHP code for that. Perhaps this article can help you to get started:
Be advised that custom PHP coding is beyond the scope of our support under our Support Policy. If you are unfamiliar with code and resolving potential conflicts, you may select our One service for further assistance.
Best Regards.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.