Im having some issues rendering the right promotional message.
Currently, in the product page and cart page it renders a generic message.
' Buy in monthly payments with Affirm on orders over $50. Learn more '
For the coding i have the following:
product page:
Code: Select all
<p class="affirm-as-low-as" data-page-type="product" data-amount="<?php echo $price; ?>"></p>
cart page:
Code: Select all
<p class="affirm-as-low-as" data-page-type="cart" data-amount="<?php echo $total; ?>"></p>
In their docs they have the following for the data amount:
Be sure to use your page's price variable or price amount in USD cents (e.g., $100 = 10000) for data-amount.
I have checked other site using Affirm and they have it this way: price $749.99 | data-amount="74999"
Later, i changed the code to this with the help of someone.
Code: Select all
<p class="affirm-as-low-as" data-page-type="product" data-amount="<?php echo $res = preg_replace('/[^0-9.]/', '', $price); ?>"></p>
What code for the product page $price and cart page total $total would i need to render the number as an integer as affirm requires it?
Thank you in advanced.