Place text under add to cart button on product page

TrendBlend
Explorer
105 0 13

Hello, I have a question about locating the text from the picture under the add to cart buttonn on the product page. I don’t know how to put the text under the add to cart button.

I got this code: https://codeshare.io/w99YdK

which results in this:

TrendBlend_0-1709594854902.png

 

so the time when the sale ends but its located wrong, it should be placed under the add to cart button not under the product price, like it is now. Can anyone help me how to place it under the add to cart button on the product page

Replies 7 (7)

Dan-From-Ryviu
Shopify Partner
7533 1454 1451

Hi @TrendBlend 

Dan here from Ryviu: Product Reviews & QA app. 

 

Could you share your store URL to check?

- Helpful? Like or Accept solution! - Buy me a coffee
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Easy and fast to create Photo Gallery, Lookbook, Shop The Look
- Enjoy 1 month of Shopify for $1. Sign up now

TrendBlend
Explorer
105 0 13

Yes sure, it is trendblend.eu

Dan-From-Ryviu
Shopify Partner
7533 1454 1451

Hi, can I know where did you add the code above?

- Helpful? Like or Accept solution! - Buy me a coffee
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Easy and fast to create Photo Gallery, Lookbook, Shop The Look
- Enjoy 1 month of Shopify for $1. Sign up now

TrendBlend
Explorer
105 0 13

Yeah sure, I added it in the main-product.liquid 

TrendBlend
Explorer
105 0 13

But I think this needs another input
var onderBuy = document.querySelector('product-info .no-js-hidden');
but im not sure which input in order to place it under the add-to-cart button

Dan-From-Ryviu
Shopify Partner
7533 1454 1451

Please move your code below buy-buttons code 

Screenshot 2024-03-05 at 16.54.29.png

Or go to your Online Store > Themes > Customize > Products > Default product > + Add block in Product information > Custom liquid, add code, drag and drop this block right below Buy button block

Screenshot 2024-03-05 at 16.53.24.png

- Helpful? Like or Accept solution! - Buy me a coffee
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Easy and fast to create Photo Gallery, Lookbook, Shop The Look
- Enjoy 1 month of Shopify for $1. Sign up now

TrendBlend
Explorer
105 0 13

When I make a custom liquid the code is still being pasted at the same place as before because the querySelector is set to this
 var onderBuy = document.querySelector('product-info .no-js-hidden');

and the div is being pasted like this:

onderBuy.appendChild(testje);

 

I think I need the querySelector for under the buy buttons but im not sure