Jump to content

Hi, I just built the website silqcollections.com but I am struggling to add an AMAZON button below instead of the "add to cart" button. I want the customer to only order through Amazon! HELP my site is live and i have no idea...

Recommended Posts

11 minutes ago, Orange008 said:

Site URL: https://www.nsecond.com/

Hi, I just built the website but I was wondering how to add an additional button below the "add to cart" button.
I want the customer can whether place the order thru Amazon or on Squarespace.

 

Thanks,
Orange

You can add a link to amazon store in product description I can help move it below using custom code

<a href="amazon-store-url" class="sqs-block-button-element--medium sqs-block-button-element" data-initialized="true">BUY FROM AMAZON</a>

image.thumb.png.904ad4b41ea8dac50cfd6b0d0f529bf6.png

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment

I really want to do the same thing...though i was advised to use Embed or COde block and enter the URL... though it is rejecting everything i do....

i even tried using the code you pasted above... still nothing...

Help any ideas? i dont want to use Shop facilities, only Amazon button.. 

thanks!

Link to comment
28 minutes ago, Ek2020 said:

I really want to do the same thing...though i was advised to use Embed or COde block and enter the URL... though it is rejecting everything i do....

i even tried using the code you pasted above... still nothing...

Help any ideas? i dont want to use Shop facilities, only Amazon button.. 

thanks!

Invite me to the site so I can have a look, bangank36@gmail.com

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
1 hour ago, Orange008 said:

@bangank36 Hi! thanks for your reply. I'm sorry that i'm pretty new on building the website. Where should i add the code to? And i want to put it under "add to cart" button with the same length.  thanks!

Copy the code to the product desription in edit mode and let me know

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
4 hours ago, Orange008 said:

@bangank36 hi, i think i copy and paste the link to the product description for each product already.

You should only copy its string only, but it also include the <pre> tag, but it's okay, I still can provide the code

<a href="amazon-store-url" class="sqs-block-button-element--medium sqs-block-button-element" data-initialized="true">BUY FROM AMAZON</a>

<style>
	.sqs-amazon-button {
      margin-top: 10px;
    }
    .sqs-amazon-button a {
      padding: 0;
    }
</style>
<script>
	document.addEventListener('DOMContentLoaded', function() {
      document.querySelector(".sqs-add-to-cart-button-wrapper").insertAdjacentHTML("beforeend", '<div class="sqs-add-to-cart-button sqs-amazon-button" role="button" tabindex="1">'+document.querySelector(".ProductItem-details-excerpt pre code").innerText+'</div>'
    );
      document.querySelector(".ProductItem-details-excerpt pre").remove()
    });
</script>

Copy this code and insert it into Setttings->Advanced->Code INjection->Header

image.thumb.png.da573129f5d1d492dd3331209944d5e1.png

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
2 hours ago, Orange008 said:

i'm sorry i still have some questions about it. I find out that the button does work only when i clicked the "amazon", but if i click the other black spaces of the button, it doesn't work. Also, can i open a new window when i clicked the button? thanks for your help @bangank36

Change the snippet into

<a href="https://amzn.to/3gYGMrM" class="sqs-amazon-button sqs-block-button-element" target="_blank">BUY FROM AMAZON</a>

<style>
	.sqs-amazon-button {
        width: 100%; 
        box-sizing: border-box; 
        width: 100%; 
        text-align: center; 
        margin-top: 10px; 
    }
</style>
<script>
	document.addEventListener('DOMContentLoaded', function() {
      document.querySelector(".sqs-add-to-cart-button-wrapper").insertAdjacentHTML("beforeend", '<div>'+document.querySelector(".ProductItem-details-excerpt .sqs-amazon-button").innerText+'</div>'
    );
      document.querySelector(".ProductItem-details-excerpt .sqs-amazon-button").remove()
    });
</script>

 

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment

Hi, 

I'm having the same issue embedding my peopleperhour widget. I've contacted them and they seem to think it should work fine the way I'm doing it. The code is below. Any ideas? 

 

<!--
    PeoplePerHour Profile Widget
    The div#pph-hire me is the element
    where the iframe will be inserted.
    You may move this element wherever
    you need to display the widget
-->
<div id="pph-hireme"></div>
<script type="text/javascript">
(function(d, s) {
    var useSSL = 'https:' == document.location.protocol;
    var js, where = d.getElementsByTagName(s)[0],
    js = d.createElement(s);
    js.src = (useSSL ? 'https:' : 'http:') +  '//www.peopleperhour.com/hire/2473969503/4834350.js?width=300&height=135&orientation=vertical&theme=dark&rnd='+parseInt(Math.random()*10000, 10);
    try { where.parentNode.insertBefore(js, where); } catch (e) { if (typeof console !== 'undefined' && console.log && e.stack) { console.log(e.stack); } }
}(document, 'script'));
</script>

Link to comment
23 hours ago, LyonsTalesEditing said:

Hi, 

I'm having the same issue embedding my peopleperhour widget. I've contacted them and they seem to think it should work fine the way I'm doing it. The code is below. Any ideas? 

 

<!--
    PeoplePerHour Profile Widget
    The div#pph-hire me is the element
    where the iframe will be inserted.
    You may move this element wherever
    you need to display the widget
-->
<div id="pph-hireme"></div>
<script type="text/javascript">
(function(d, s) {
    var useSSL = 'https:' == document.location.protocol;
    var js, where = d.getElementsByTagName(s)[0],
    js = d.createElement(s);
    js.src = (useSSL ? 'https:' : 'http:') +  '//www.peopleperhour.com/hire/2473969503/4834350.js?width=300&height=135&orientation=vertical&theme=dark&rnd='+parseInt(Math.random()*10000, 10);
    try { where.parentNode.insertBefore(js, where); } catch (e) { if (typeof console !== 'undefined' && console.log && e.stack) { console.log(e.stack); } }
}(document, 'script'));
</script>

Sometime if your template support ajax loading, you need to disable ajax in Design > Site Styles > Ajax

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 2 years later...
13 hours ago, MKrause18 said:

 I would love the Amazon button to be right under the purchase button.

For a simpler solution, where the Amazon button is created directly in the product description by typing the button caption and adding the Amazon URL, see this thread:

Let me know if this helps.

Did this help? Please give feedback by clicking an icon below  ⬇️

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment

Create an account or sign in to comment

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

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.