How can I position a custom static section below the 'Buy It Now' button?

When I added a custom static section to the product page.

The section goes at the end of the page.

How to make this section appears for example below the BUY IT NOW Button ??

Hi @Aly5

You need to understand how templates/sections/snippets work. Theme 2.0 announcement solves most of the issues.

You cant put a section within a section. It seems like you put the section in a template. Specially you put it in the product.liquid.

You need to add what’s called a snippet into a section. In this case you are using debut theme, and that section that holds the add to cart is called the product-template.liquid (Section).

Scroll down to around line 215 (estimated), that’s the start of the add to cart code, line 241 (estimated) is the end, after this line paste your custom code.

Again you cant include a section within a section, you need to put a snippet there. Then for the Customizer options you need to add it within the same product-template.liquid (Section).

2 Likes

Hi @JohnFromJotting

Thanks a lot for your response.

Unfortunately, I don’t understand you well.

Now I’ve already added my static section to the product.liquid in the section folder

should I create a snippet file to store the data of my static section and include the snippet in product-template.liquid??

How could I access the data from the static section in my snippet? Can you please explain this with a real example in the debut theme?

Note: I’ve already known that I couldn’t add my static section into another section and I should write my own could into product-template.liquid too but I can’t know what the snippet should be written after line 241 for example to make my static section appears in this place.

Excuse me for my many questions, I’m a new developer.

Thanks for your efforts.

1 Like

Unfortunately itll just be way too long to explain. What are you trying to achieve, if it’s simple ill code it out for you.

If not you either need to hire a developer and/or learn the basics of shopify folder layout.

2 Likes

@JohnFromJotting

Thanks a lot for your efforts.

I will do my best to figure it out.

1 Like