Well this thread seems to be a little dated, but in installing this contribution. I ended up making my own edits that might be of value to others that come across this thread in the future.
I have learned in making edits to the Zen Cart (ZC) files simple is best.
I first started with making this addition to the Custom_Template/english.php
PHP Code:
// Buy Now Link in Specials, New, and Featured Products listings
$specials_buy_now_link = false; // Change this to true to show Buy Now in Specials Products listings
$new_buy_now_link = false; // Change this to true to show Buy Now in New Products listings
$featured_buy_now_link = false; // Change this to true to show Buy Now in Featured Products listings
This is a global file for ZC which is loaded quite often. If I knew how to make the changes for globals to the Admin section. This edit would not be needed (any help would be appreciated)
Caution: remember to save the new specials_index.php file to the Custom_Template directory under Modules
Second since the Original Contribution required another contribution to be used in conjunction, and had the side effect of breaking the box (div's for the products). I knew I had to change the Mod to work for my site. This was done by editing the code for the specials_index.php after finding this line
PHP Code:
while (!$specials_index->EOF) {
We added these lines just below that line
PHP Code:
if ($specials_buy_now_link == true) {
$buy_now_link = zen_get_buy_now_button($specials_index->fields['products_id'],'<br/> <br /><a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $specials_index->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT) .'</a>');
} else {
$buy_now_link = '';
}
This edit to the file makes sure that if you don't like the mod you can change back to the old way just by editing the english.php file earlier. I first off wanted the "Buy Now" to be below the ZC price. You then look for line in specials like this
PHP Code:
. '</a><br />' . $products_price);
You will be changing it to be this
PHP Code:
. '</a><br />' . $products_price . $buy_now_link);
I proceeded to make these changes to the featured and new products php files. Remembering to put in the if statement for old fall back in case I decided the mod wasn't what I wanted. If anyone would like more detail for the edit I did just use the forum to contact me.
--
Red Baron
Bookmarks