Jump to content

Shopify button in processwire


kuba2
 Share

Recommended Posts

Hi there

 

I am intending on using the shopify button, which is created by embedding a code from shopify...

Is that doable with processwire and php? I saw they make an embed code for html...can I put that somehow in the backend, so that the php puts it out as html code?

At the moment I have this PHP code:

              <?php foreach ($page->children() as $product): ?>

                <div class='single-product-wrapper'>
                  
                  <img src="<?php echo $product->img->first()->url; ?> "/>
                  <p><?php echo $product->inhalt1; ?></p>

                </div>

              <?php endforeach; ?>

 

What is the best way to combine shopify an PW?

 

Thanks

Jakob

Link to comment
Share on other sites

yes, you can create the shopify_embed field for example, a textarea (can use plain or ACE Extended). Then for each product you have you just need to grab the code and paste in that field. then you can just echo the embed code...

<?php echo $product->shopify_embed; ?>

 

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...