FROM CACHE - en_header

AfterPay and Dawn Theme Issues

Ben_O_Brien
Tourist
11 0 0

Hi all

I'm customizing the Dawn theme and hoping for it to go live today. My current live store is the Brooklyn theme. - www.secondearth.com.au 

In the Dawn theme the issue I have is the Afterpay information appears when the product page loads but disappears as soon as a variant or quantity is selected. And secondly the afterpay logo is not appearing in the footer along with the other payment options. These are not issues in my live brooklyn store but only occur in my draft Dawn theme. 

Ive reached out to Afterpay but have been waiting days for a response.

Appreciate any advice

Thanks

Ben

Replies 3 (3)
ooyaasuumii
New Member
2 0 0

Having this same issue 

ooyaasuumii
New Member
2 0 0

Actually just figured it out. 

 

At least in my case, I was using a swatch / variant app to show different images / prices based on the currently selected variant. This was completely removing the price element from the DOM (where after pay sits by default when added to the theme) and replacing it with a new one using JavaScript, hence why it would completely disappear and not simply go display:hidden, or something. 

 

To solve:

 

Go into your theme.liquid and find your Afterpay code. Locate the commented out afterpay_product_selector variable and remove the // and save.

 

// var afterpay_product_selector = '#product-price-selector';

 

Now go to your product template, whatever it may be called in your theme, and add the following code wherever you want the Afterpay badge to appear. This worked for me on Dawn theme. 

 

<div id="product-price-selector"></div> 

  

SeanMythen
Shopify Partner
2 0 0

To fix the first issue, in your theme's CSS file add this:

 

p.afterpay-paragraph {
    display: block !important;
}