This topic has 38 replies, 3 voices, and was last updated 1 years, 7 months ago ago by Rose Tyler
FYI
The 4 items works when i change the settings to SLIDER. But i don’t want a slider if possible for single product page related items..
Hello,
I’ve set https://prnt.sc/PtZI_-MU4tex Please clear cache and check the result now – https://prnt.sc/MoUhdTDDyOH0 (not in customizer but on the live single product page).
Regards
I remember the related product css that was added was for the fix for the setting because it’s showing lots of products in it. This was long ago. Don’t remember exactly but it was there for a reason.
Cleared cache on both Firefox and Chrome. https://prnt.sc/aVlH4b9EEZPO
The related products is showing 50 products on single product page.
Didn’t fixed it. Can you check it again please?
Any help?
good morning. i hope someone could help me out fix this problem this week. it’s been 2 days since someone answered me here.
FYI. i’ve disabled the related product on my website now. Since it’s too annoying to show 50 items on related products.
This should be fix since this is a theme issue.
Hello,
This code shows 50 related products – https://prnt.sc/Rx0DQELgTh4e , so delete or change the code.
Regards
What code should i put here? Can anyone tell me?
Seems like this is fixed but it looks weird when editing. https://prnt.sc/v7o8ugXacLna
I want to change the related product text. Would there be an easier way than putting translation?
Thanks
Hello,
“it looks weird when editing” – is it fine when the editor is closed? Incorrect displaying in the editor can be also caused by your custom changes in the child theme.
“I want to change the related product text. Would there be an easier way than putting translation?” – https://prnt.sc/VxzgzMu1-AFS , check now – https://prnt.sc/3SwjVdBBuiEV > https://prnt.sc/QEG5SxfReH7J You can change the text as on the screenshot, or disable the Loco Translate plugin and changes will be visible still.
Regards
Seems fine when published. Nots sure what causing this problem. I dont have that much custom changes on this website. Or maybe the old custom we made for this site makes it wonky.
Wow that’s neet. Will check it out and play with the plugin later. I’m on the process of optimizing the site. Can you give me an idea where to start?
Thank you Rose!
Oh last thing.
Before this changes. I had my Related Products only show the in stock products. Excluded are the old and out of stock products. Right now it’s mixed again.. Looking for a good solution but i can’t find a good one. I remembers the CSS was there for this..
I know this code was added before to fix this. But now this code doesn’t work properly on the settings anymore..
/* Related products */
.related-products {
--columns: 6;
display: grid;
grid-template-columns: repeat(var(--columns),1fr);
}
@media only screen and (min-width: 481px) and (max-width: 992px) {
.related-products {
--columns: 3;
}
}
@media only screen and (max-width: 480px) {
.related-products {
--columns: 1;
}
}
.related-products div.product {
width: 100% !important;
}
.related-products:before,
.related-products:after,
.related-products .outofstock,
.related-products .instock ~ .instock ~ .instock ~ .instock ~ .instock ~ .instock ~ .product {
display: none;
}
.related-products div.product {
clear: none !important;
}
Can you help me on this?
Hello,
it is better to reach with php filters/actions but not with CSS styles.
As we see you have previously rewritten file of related.php but it is renamed now -> https://prnt.sc/Hc66fShe7tbl . As you see we provided you before the filter to hide out of stock items -> line 21 (which is commented now) and line 172 (which is commented now as well) -> https://prnt.sc/0FxUv1MoMslF . You may renamed your related09162022.php-> related.php and uncomment those lines described above and check then.
Example: https://prnt.sc/Iz_kZNTdyucE ( before ) = all products instock/outofstock
https://prnt.sc/-tx3TAbXwgw1 (after) = only in stock products
The custom function is located in your child-theme/functions.php -> https://prnt.sc/ycfdAbymXzBh
Regards
Ohh you guys are the one who made that. I forgot. I’ll try your instruction. I’ll let you know if i encounter any problem. Was trying to minimize the use of the template in woocomerce childtheme folder to atleast know which are the ones who are making the site load so slow.. Will do an update in a bit.
Done
There seem to be a problem. Sometimes it only loads 1 or 2 products. Sometimes none. Do i need to wait or add something to related.php?
Thank you very much
Hello,
You had next part of code -> https://prnt.sc/aWD-UB0-cMWL which prevented to show products which are not visible. But now you have added the filter to prevent outofstock product from showing.
We commented that part for you ( https://prnt.sc/785ll6fcvYgJ ) so you may check now !
Also, you should know that if there are no products to show then there will be no products (it is logic)
Regards
Wow thank you very much for the tweak. As i’m not really a programmer this give me more info how it works. Learned from this. Will keep an eye for this and report back in a few days. if all goes well will mark this as solved.
Thanks a lot!
Hello,
You’re welcome!
Regards
You must be logged in to reply to this topic.Log in/Sign up