![]() |
Adding the Order Button to the Featured or Category Pages
I would like to give the customer the option of ordering directly from the featured or category pages so they don't have to click on the product link to get a more detailed description of the product before ordering.
Has anyone done this that can help me figure it out. I tried just copying the code from the product.tpl page (just the code for the table with the product options) - but it didn't work. This would certainly help streamline a customer's experience if they knew what they were shopping for. Another Question - for a store with few products, it would be helpful to be able to display all the products (in order of category) on the first page a customer goes to when entering in the store. Is there a way to do that without making them all Featured Products? |
I totally agree - in the standard set up there are too many clicks needed to purchase.
Here is the codes to be added into the products.tpl template found in skin1/customer/main/ Code:
<form name=orderform_{%product.index%} method=post action="cart.php?mode=add"> Put that in the template where you want it to appear on the listing adding in the appropriate html for your set up. Your second question - I have built this option to show all the products on a separate page but I guess it could be adapted to show on the front page. It must only be used for relatively small numbers of products though else it weirds out. I will find and adapt the code and repost it. |
code is shown towards the bottom of http://forum.x-cart.com/viewtopic.php?t=1179&highlight=
If you were putting this on the home page I would adapt the welcome.tpl template to replace {include file="customer/main/featured.tpl" f_products=$f_products} with {include file="customer/main/listall.tpl" products=$products} and amend the customer/home.php file from require "./featured_products.php"; to require "./total_list.php"; PLEASE BACKUP ALL FILES BEFORE DOING THIS JUST IN CASE!! |
Thanks!
Thanks - that did it!
|
All times are GMT -8. The time now is 03:45 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.