Posted - 03/19/2024 : 20:13:00
Add pay later display options such as PayPal Pay in 3 to the product detail page.
Very easy to implement to the $detailpagelayout or code directly to the proddetail.php page. For example:
Add this script below which you get from PayPal to the <head> section before the </head> of the proddetail.php page.
[code][blue]<script src="https://www.paypal.com/sdk/js?client-id=[red]YOUR-CLIENT-ID[/red]¤cy=[red]YOUR-STORE-CURRENCY[/red]&components=messages" data-namespace="PayPalSDK"></script>[/blue][/code]
Add this line below to the end of the function pdddiscountprice() in the incproddetail.php
[blue][code]print '<div class="paypalprice" data-pp-message data-pp-style-layout="text" data-pp-style-logo-type="inline" data-pp-style-text-color="black" data-pp-amount="' . $discountprice . '"></div>';[/code][/blue]
Alternatively create a new function in incproddetail.php e.g. [blue]function pddpaylaterprice()[/blue] with the line above then add to $layoutoption [blue]paylaterprice[/blue] then add to the $detailpagelayout in the includes file where you want it to display.
John
|