Hi, within my collection product grids, I moved the price to my quick add add to cart button, but I was wondering if there was a way I can add a few words where the price used to be (under product title). I made a metafield for it if it helps but I don’t know how to incorporate since there is no editing options within the product grid. This is what it looks like:
:
@WalkYourStyle I added that, but what do I do now? That metafield’s name is “Product Short Description” would that change anything? Still can’t add it to the product grid it seems
@oscprofessional i have the metafield made already, but how can I take that metafield, and add it within the product grid on a collection tab under the product title?
so you replace it with {{ card_product.metafields.custom.product_short_description }} like shown below
@WalkYourStyle Unfortunately, it didn’t work
Please show me an image of the code after you added the code.
@WalkYourStyle
And I tried “product-short-description” and “my-product-short-description” , didn’t change anything on the website preview.
@WalkYourStyle oh yes, my bad, it worked! How can I make the font smaller though?
In the assets folder of your theme’s code find the ‘base.css’ and at the bottom of the file add this code:
.my-product-short-description{
font-size: 12px; /* Change the number according to your preference */
}
Thanks! Worked perfectly!
@WalkYourStyle one more thing, how can I change this metafield’s font size for mobile? That code works for laptop viewing but doesn’t seem to change on mobile
Can you please share your store’s URL?
https://vwchrksunqiritr3-57075630262.shopifypreview.com
@WalkYourStyle
It looks great on laptop, but is too big on mobile as it extends to that second line
Note: Only the single SPF 50 Spray Sunscreen under “Suncare” has the metafield attached
From the inspector tool it looks like the font size applies to screens with minimum width of 990px.
Try adding this code
.product-short-description {
font-size: 11px !important;
}
And if it still doesn’t work add this one
@media screen and (max-width: 989px){
.product-short-description{
font-size: 11px;
}
}
@WalkYourStyle Unfortunately, both didn’t work, I added them to base.css. I want it to be 11 px on laptop which is great, but on mobile to be 8 or 9.
I found the problem. What you have to do is to add this code
@media screen and (max-width: 989px){
.product-short-description{
font-size: 11px;
}
}
at the start of the base.css or before it get’s overridden by other css.
@WalkYourStyle this didn’t change anything either, I added to the base.css file before my edits started, I added it at the end of the default base.css but it is still the same.