Shopify: How to add External Link Buy Now button and remove Add To Cart button

I have some products (eBooks) that are only available to purchase on Amazon so I needed a way to add a BUY NOW ON AMAZON button and also needed to remove the ADD TO CART button.

This solution requires an App that lets you add custom Metadata Fields to your products. I tested a few different free ones, and ended up going with Simple Admin https://apps.shopify.com/simple-meta

This solution also requires adding some custom code to your theme. In this example I am using the free theme called SIMPLE.

STEP 1
Add and install the Simple Admin app to your Shopify store.

STEP 2
Once installed, go to your Apps section and click on Simple Admin to go to its dashboard.

STEP 3
Click on PRODUCTS over in the top right corner.

STEP 4
Choose the product you want add the Buy Now External Link button too, and click the ID number of that product.

STEP 5
Click on the META tab.

STEP 6
Click ADD METAFIELD.

STEP 7
Enter the following information:
KEY: BuyNowText
VALUE: BUY NOW on Amazon.com
VALUE TYPE: String
NAMESPACE: CustomExternalLink
DESCRIPTION: The value is the text the customer will see on the button.
Click SAVE.

STEP 8
Click ADD METAFIELD again.

STEP 9
Enter the following information:
KEY: BuyNowLink
VALUE: https://anydomain.com/some/link/to/product
VALUE TYPE: String
NAMESPACE: CustomExternalLink
DESCRIPTION: Enter external link in the value field. To disable external link, enter the word “none” (without quotes) in the value field.
Click SAVE.

STEP 10
Now go to ONLINE STORE then THEMES then click on ACTIONS for your current theme and choose EDIT CODE.
NOTE: I am using the free SIMPLE theme.

STEP 11
Locate the SECTIONS / PRODUCT-TEMPLATE.LIQUID file and click on it so the file opens up in the editor.
NOTE: The following code that I am going to modify is specific to the SIMPLE theme and is located in the SECTIONS / PRODUCT-TEMPLATE.LIQUID file. The code you are looking for may be slightly different if you are using a different theme, and may also be located in a different file. Another file to check for the code would be the TEMPLATES / PRODUCT.LIQUID file.

STEP 12
Look for the following code:

<div class="product-single__cart-submit-wrapper{% if section.settings.enable_payment_button %} product-single__shopify-payment-btn{% endif %}{% if section.settings.add_to_cart_width == 'full_width' %} product-form--full{% endif %}">
  <button type="submit" name="add" id="AddToCart"class="btn product-single__cart-submit{% if section.settings.add_to_cart_width == 'full_width' %} btn--full{% endif %}{% if section.settings.enable_payment_button %} shopify-payment-btn btn--secondary{% endif %}">
    <span id="AddToCartText">{{ 'products.product.add_to_cart' | t }}</span>
  </button>
  {% if section.settings.enable_payment_button %}
    {{ form | payment_button }}
  {% endif %}
</div>

STEP 13
Replace the code above with this code:

{% comment %}
  MOD by Jeff - Wrapped the DIV with the IF-ELSE statement to show External BUY NOW button.
              - When link is found, the ADD TO CART and BUY NOW buttons will disappear and this button will show instead.
              - Use Simple Admin app to add custom metafields.
              - NAMESPACE: CustomExternalLink
              - KEY: BuyNowLink = enter http link to external site or the word "none" without quotes to disable
              - KEY: BuyNowText = the text you want customer to see
{% endcomment %}
{% if product.metafields.CustomExternalLink.BuyNowLink == blank or product.metafields.CustomExternalLink.BuyNowLink == 'none' %}
<div class="product-single__cart-submit-wrapper{% if section.settings.enable_payment_button %} product-single__shopify-payment-btn{% endif %}{% if section.settings.add_to_cart_width == 'full_width' %} product-form--full{% endif %}">
  <button type="submit" name="add" id="AddToCart"class="btn product-single__cart-submit{% if section.settings.add_to_cart_width == 'full_width' %} btn--full{% endif %}{% if section.settings.enable_payment_button %} shopify-payment-btn btn--secondary{% endif %}">
    <span id="AddToCartText">{{ 'products.product.add_to_cart' | t }}</span>
  </button>
  {% if section.settings.enable_payment_button %}
    {{ form | payment_button }}
  {% endif %}
</div>
{% else %}
  <a href="{{ product.metafields.CustomExternalLink.BuyNowLink }}"><button class="btn" style="background-color:black; pointer-events: none;"><span>{{ product.metafields.CustomExternalLink.BuyNowText }}</span></button></a>
{% endif %}
{% comment %}
  END MOD by Jeff
{% endcomment %}

STEP 14
Click SAVE.

STEP 15
Go view your product and you should see the new BUY NOW button has been added and the ADD TO CART button has been removed.

 

Enjoy!!!

CallCentric VoIP Phone Provider Review

CallCentric VoIP Phone Provider Review

CLICK HERE for Official Site of CallCentric VoIP Phone Provider Review
Callcentric

If you are looking for a great VoIP company, I want to highly recommend CallCentric VoIP Phone Provider Review in this review.

They have very competitive prices, awesome service, and most importantly you can sign up for a FREE account and make unlimited free calls to other CallCentric customers for life.

VoIP stands for Voice Over Internet Protocol and basically means that CallCentric is phone service provider that uses the internet to make calls instead of using traditional copper phone lines. This results in huge savings on your monthly phone bill, especially when it comes to international long distance.

CLICK HERE for Official Site of CallCentric VoIP Phone Provider Review

For your personal phone, they can help you get up and running quickly with either your own device (BYOD) or can recommend different devices that have been tested with their service. And for business, they can help you with a simple single phone setup or with a complex PBX or Asterisk Server. They have several plans to choose from including pay-as-you-go and unlimited calling plans, and you can also choose your own phone number from a variety countries.

They have now also added new features such as IVR (automated attendants), SMS, multiple extensions, and more!

You have nothing to lose by trying their FREE service (no credit card required), so sign up today and you will not regret it!

From their website:

 Imagine you have a phone number so callers can reach you whether you’re near or far; walking with a mobile phone, at home or the office, using VoIP or a regular phone line. And even more, this number is not in the country where you live.

Sign up now for CallCentric VoIP Phone Provider Review and try it before you buy it for free.

Callcentric
CLICK HERE for Official Site of CallCentric VoIP Phone Provider Review

Beat your speeding ticket with an Expert Witness

In Ontario, speeding tickets are very hard to beat because the caselaw basically allows the Justice of the Peace and the Judge to simply accept what the officer says as fact. If the officer says you were speeding, then it must be true! If the officer says they were trained on the Radar or Lidar device, then it must be true! If the officer says the device was working properly at the time, then it must be true! Of course we know that just because the officer believes the Radar or Lidar was working properly, does not mean it actually was. With an expert witness, you can then challenge the credibility of the officers statements and bring evidence that shows the device may not have been accurate at the time it was used.

You should also read the following post on why you need an Expert Witness: Caselaw regarding the need for an Expert Witness

Caselaw regarding the need for an Expert Witness for Speeding Trials

This is not legal advice and is for informational purposes only.

The purpose of an expert witness is to bring unbiased information to the court so the Justice of the Peace or Judge can make a better informed decision. An expert witness possesses special knowledge and experience going beyond that of the trier of fact. (see R. v. Beland, [1987] 2 S.C.R. 398, at paragraph 16).

In Ontario, the courts simply take at face value the officers statement that they are a qualified radar/lidar operator and that they believe the device was working properly at the time, and therefore the speed reading was correct. Even cross-examination of the officer on these points is mostly useless because the court will say “there is no statuatory requirement as to what a qualified operator is, so they say they were trained, so it must be true, and they say it was working properly, so it must be true”.

The only way to you can beat it, is for the defence to put their own expert on the stand who can explain why the device has a very good chance of NOT being accurate (since they are NEVER calibrated in Ontario).
Continue reading

What to do when pulled over by police in Ontario or Canada

This is not legal advice and is for informational purposes only.

DRIVING A VEHICLE IN CANADA:
When you are detained by police (pulled over at the side of the road, DUI/RIDE checkpoint, etc), section 10(a) of the Canadian Charter of Rights and Freedoms requires them to tell you why. So whenever you are stopped, and they come to your vehicle window, immediately ask them:

* Why did you stop me?
* Am I being detained?

DO NOT ANSWER ANY QUESTIONS:
Be nice and be polite (they have guns), but remember you do not have to answer any questions. Always answer “I CHOOSE NOT TO ANSWER ANY QUESTIONS, THANK YOU” or “I DO NOT WISH TO MAKE A STATEMENT, THANK YOU” to everything they ask you. This is your fundamental right to be free from self-incrimination and therefore not provide police with evidence that may be used against you. Everything you say can and will be used against you in a court of law. Also remember that you should never lie to police. It much better to say “no comment” than to lie.
Continue reading

R vs Jordan- Right to a Speedy Trial- Charter Section 11b Argument

This is not legal advice and is for informational purposes only.

In Ontario, your right to a speedy trial used to kick in after 10 to 12 months, but with the Jordan decision, it was (sort of) raised to 18 months.

The following are my thoughts and comments on the R v Jordan 2016 SCC 27, [2016] 1 SCR 631 decision regarding the Right to a Speedy Trial under Charter Section 11b.

You can find it here if you want to read it yourself:
https://scc-csc.lexum.com/scc-csc/scc-c … 7/index.do
Continue reading