Prev | Current Page 367 | Next

Emilian Balanescu and Cristian Darie

"Beginning PHP and MySQL E-Commerce: From Novice to Professional, Second Edition"

const.PAYPAL_EMAIL}" />

value="{$obj->mPayPalContinueShoppingLink}" />
value="{$smarty.const.PAYPAL_RETURN_URL}" />
value="{$smarty.const.PAYPAL_CANCEL_RETURN_URL}" />




CHAPTER 9 ?–  RECEIVING PAYMENTS USING PAYPAL 262
10. Add the following styles to the styles/tshirtshop.css file:
div.yui-b div form.add-product-form
{
margin: 0;
padding: 0;
}
.add-product-form p
{
margin: 0;
padding: 0 0 10px 0;
}
.view-cart
{
padding: 10px;
text-align: center;
}
11. Load TShirtShop in a browser, and click one of the Add to Cart buttons, or click the View Cart button. You
should get the PayPal shopping cart, which looks like Figure 9-4. Experiment with the PayPal shopping cart
to see that it works as advertised.
How It Works: PayPal Integration
You wrote quite a bit of code, but now all your visitors are potential customers! They can use the PayPal shopping
cart to purchase your products!
To implement this feature, you first created Add to Cart buttons in the product lists. You modified presentation/
products_list.php to add the Add to Cart URLs to each product:
$this->mProducts[$i]['link_to_add_product'] =
Link::ToAddProduct($this->mProducts[$i]['product_id']);
Then you modified the template file by adding the buttons:
action="{$obj->mProducts[k].


Pages:
355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379
Apartamenty Świnoujście noclegi hel Lokaty jednodniowe projekty domków letniskowych męskie skarpetki rowerowe