Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Re: Import a page into modal

Solved

How can I import a page content into a product modal?

heyitslamer
Tourist
3 0 1

I have a page in a shop i've been working on that displays a size guide for the types of products available.

I would like to insert a modal in the product page that opens with the contents of the afromentioned page.

Implementing the modal itself is not that hard, but is there any way to import the contents of the page into the modal instead of copying them directly so that any change to the  page are also reflected in the modals content?

Any help is apreciated.

Best regards

Accepted Solution (1)
LitCommerce
Astronaut
2860 684 752

This is an accepted solution.

Hi @heyitslamer,

Yes, you add it for sections schema. And get it with variable: {{ section.settings.page.content }}

Or can you send me the full code of the file. I will check it.

LitCommerce - The Most Simple & Affordable Multi-channel Selling Tool.
Effortlessly sell on biggest marketplaces like Amazon, Etsy, eBay, Facebook etc with bulk listing tool, real-time sync & smart order management. Use LitCommerce free for 1-year now!

View solution in original post

Replies 5 (5)

LitCommerce
Astronaut
2860 684 752

Hi @heyitslamer,

If you have experience with Liquid code you can use declarative: "type": "page"

Ex:

{
  "type": "page",
  "id": "page",
  "label": "page"
}

it is declared in the schema of the section.

Hope it clear to you.

LitCommerce - The Most Simple & Affordable Multi-channel Selling Tool.
Effortlessly sell on biggest marketplaces like Amazon, Etsy, eBay, Facebook etc with bulk listing tool, real-time sync & smart order management. Use LitCommerce free for 1-year now!
heyitslamer
Tourist
3 0 1

Ty for the relply,

I definetely lack experience with Liquid. Do i just insert that piece of code in the sections schema? Or do i need something else to to tell the section which page i want?

 

LitCommerce
Astronaut
2860 684 752

This is an accepted solution.

Hi @heyitslamer,

Yes, you add it for sections schema. And get it with variable: {{ section.settings.page.content }}

Or can you send me the full code of the file. I will check it.

LitCommerce - The Most Simple & Affordable Multi-channel Selling Tool.
Effortlessly sell on biggest marketplaces like Amazon, Etsy, eBay, Facebook etc with bulk listing tool, real-time sync & smart order management. Use LitCommerce free for 1-year now!
heyitslamer
Tourist
3 0 1

I was able to finish the modal with your sugestion, tysm.

 

Best regards.

Andre094
Shopify Partner
3 0 0

can you help me with that? i have same problem.