This is a discussion on Adding a Button to the Product listing page within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; I want to add a button to the Product listing page like "More Detail" This would go to ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| I want to add a button to the Product listing page like "More Detail" This would go to the same Product page that it would when you click the product name. Reason "not every body knows to click the product name to go to the product page" This way at least if the click the image "More Detail" it will show the rest of the information needed to checkout and buy the product. But I am not sure where to make these changes. or where to add the button. |
|
#2
| |||
| |||
| depending on which listing method you use, either 1) product_listing.php or 2) product_listing_col.php Both are in /includes/modules
__________________ so endith the lesson<think>sometimes I just sit's and thinks</think> "Here you are with a hand full of holes, a thumb up your ass, and a big grin to pass the time of day with." - TWB |
| The Following User Says Thank You to met00 For This Useful Post: | ||
starview (06-15-2007) | ||
|
#3
| |||
| |||
| Quote:
Do you know where in the product_listing.php I might make the changes? I think this file handles the product page also. |
|
#4
| |||
| |||
| Quote:
FIRST BACK UP All YOU FILES LISTED BELOW BEFORE YOU MAKE ANY CHANGES!!! This is only for people who do not use the "Buy Now" button. This is around about way of doing this, and if you want to rewrite the files that is your thing. Myself I don't know that much about programming in OsCommerce PHP. This adds a "View Detail" button in your product listing page. I have tried to use the "BUY Now" in the product listing page by activating it in the Admin page. But it works only if you have options for your products. If you don't it will add the product to your shopping cart. Whick I didn't want. So I maked the following changes File:incudes/modules/product_listing.php Find: case 'PRODUCT_LIST_BUY_NOW': $lc_align = 'center'; $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; break; } Replace it with: case 'PRODUCT_LIST_BUY_NOW': $lc_align = 'center'; $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; break; } File:incudes/languages/english/index.php Find: define('TABLE_HEADING_BUY_NOW', 'Buy Now'); Change it to: define('TABLE_HEADING_BUY_NOW', 'View Detail'); File:incudes/languages/english.php Find: define('IMAGE_BUTTON_BUY_NOW', 'Buy Now'); Change it to: define('IMAGE_BUTTON_BUY_NOW', 'View Detail'); Replace your includes/languages/english/images/button/button_buy_now.gif With any new button_buy_now.gif, keep the name the same. Mine diplays "Show Detail" as a image button. Now final: Go on to your admin page select configuation, click Product listing click and edit "Display Buy Now Column" with a "1" this activates this. Your none. |
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Buy/Add button removal if quantity = 0(for SPPC w/ Column Product Listing) | michael_s | New osCommerce Contributions | 0 | 05-03-2007 11:12 PM |
| Quick stock update from the product listing page | michael_s | New osCommerce Contributions | 0 | 01-20-2007 07:50 AM |
| Tell a Friend Button on Product Information Page | michael_s | New osCommerce Contributions | 0 | 01-09-2007 05:46 PM |
| Product Quantity on Product Listing Page | vinces | osCMax v1.7 Discussion | 2 | 12-10-2004 06:32 PM |
| Complete product listing on 1 page. | twinklep | osCommerce 2.2 Modification Help | 1 | 09-29-2004 09:06 AM |