Prev | Current Page 660 | Next

Emilian Balanescu and Cristian Darie

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

However, if you??™re just starting out or revising the way you do things, you have plenty
of options to consider.
The simplest option is not to worry about shipping costs at all, which makes sense if there
are no costs, for example, in the case of digital downloads. Alternatively, we could simply include
the cost of shipping in the cost of our products. Or we could impose a flat fee regardless of the
items ordered or the destination. However, some of these options could involve customers
either overpaying or underpaying, which isn??™t ideal.
The other extreme involved is accounting for the weight and dimensions of all the products
ordered and calculating the exact cost. This can be simplified slightly because some shipping
companies (FedEx, among others) provide useful APIs to help us. In some cases, we can use
a dynamic system to calculate the shipping options available (overnight, three to four days, and
so on) based on a number of factors, including package weight and delivery location. The exact
methods for doing this, however, can vary a great deal among shipping companies, and we??™ll
leave it to you to implement such a solution if you require it.
In this book, we??™ll again take a simple line. For each shipping region in the database, we??™ll
provide a number of shipping options for the user to choose from, each of which will have an
associated cost.


Pages:
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672
wyciągarki wróżby miłosne cukiernia-stykowscy.pl salon kosmetyczny kraków pompy ciepła