-
Notifications
You must be signed in to change notification settings - Fork 63
Cart
###/cart/index.php
##Things to Consider
-
Three partial files are called within index: _cartitems, _carttaxes and _sharecart
-
_cartitems renders the actual table of products and the calculated totals. It in turn renders _carttaxes.
-
_carttaxes renders the tax totals just like the sub-total, shipping and total. Unless a shipping address is defined and cached (which happens at checkout) most of the time you won't see these values here.
-
when the end user clicks on the Email Cart button, _sharecart is invoked which renders a pop up form window that the end user fills in to email their cart to a friend(s)
-
-
If a promo code has been applied at checkout, it's details are displayed here. The code to handle this is currently in the _cartitems file.
-
If a promo code has been applied at checkout, or products with quantity discounts have been added to the cart such that the discount becomes active, the original price is shown in strikethrough next to the new price. Again this is simply a CSS style that can be easily overridden should you wish to display it differently.
-
_cartitems is an html table which allows for better flexibility when the screen size collapses on different devices.
-
_cartitems is rendered on the checkout page as well.
You will notice there is no button to take the user to the Checkout page. This is because in the brooklyn theme that this screenshot was taken from, the Checkout button is in the second column display (see layouts). Depending on how you choose to layout your site, you may want to include a checkout button here.