4.6 Linking the products with the site

Now we have to link our products with our site. This is really easy to do. We have to go to 'includes\contents' and add the product link code to the include page product that we want. So at the FirstBook.inc we add the productHX0001.php file :
<!--START 'BUY NOW' BUTTON-->
<?php
//MODIFY Button Link For A Pruduct. 
//(Choose A Product File)
include 'Products/productHX0001.php';

//DO NOT MODIFY
print $Product['ButtonLink'];
?>
<!--END 'BUY NOW' BUTTON-->
Product link code
In this mode we linked FirstBook.inc with our product with ID = productHX0001.
We do the same with the other products. So we link SecondBook.inc with the productHX0002.php and MyCd.inc with the productHX0003.php. As you can see the linking code shows the Button link of the included product. So in the FisrtBook.inc page the product link code shows the Button Link (BUY NOW) of the product with ID = 'productHX0001'.

It is time now to test the linking of our web pages with the associated products. Copy the '05Demo' folder to
C:\Program Files\xampp\htdocs
now with the help of firefox go to the address
http://localhost/05demo/book1.php
and make sure that you see the string 'Substitute this string with the BUY NOW code that gives paypal.com or sandbox.paypal.com. BUY ME No1'. This will confirm that your web page is linked to the associated product. The same result should get with the second book and with My Cd.
Successful linking FirstBook.inc page with the product data
fig:21 Successful linking FirstBook.inc page with the product data

Successful linking SecondBook.inc page with the product data
fig:22 Successful linking SecondBook.inc page with the product data



Copyright © TrustFm.net 1998-2024 - Made by TrustFm - All Rights Reserved Worldwide