How can I consistently display Affirm messages on my product pages?

Hello,

I’m looking to add AFFIRM message to my products. like shown down in the example below.

I downloaded the affirm pay message app but no luck. had help with a great person here to try and help me code the message but it’s very inconsistent. I would have to refresh the page to get it to load up. instead of it loading up how SHOP PAY installments would.

Any help with getting affirm to show up like the example I provided down below.

website: Zoshmfg.com

theme: streamline

To add an AFFIRM message to your products, you can use custom code to add the AFFIRM messaging to your product page template. Here’s an example of how to do this:

  1. Add the AFFIRM messaging code to your product page template. You can do this by adding the following code to your product.liquid file, below the product price:

This code loads the AFFIRM messaging script, sets the AFFIRM configuration options, and displays the AFFIRM messaging on the product page with the amount, payment options, and “As low as” messaging.

  1. Replace YOUR_PUBLIC_API_KEY with your actual public API key from AFFIRM. You can find your API key in your AFFIRM account dashboard.

  2. Save the product.liquid file and test the product page to see if the AFFIRM messaging appears.

i have try and it’s doesn’t work

The best way to do it ist this:

1st.- Aftter set up the payment method and your account go to customize theme:

2nd.- go to product page:

3rd.- In product information find add new block:

4.- find affirm at the bottom of the blocks:

and that is it.

I think this seems like a great solution although I’m receiving a Syntax error on line 266, any idea on how to fix this?

add like this it will work