Re: Buy now button in main page products
Quote:
Originally Posted by
jellygraphics
Hi
I'm trying to add this to my shop - when I do so, I get the button as required, however the whole grid of the site falls apart! It's like the containing frame isn't big enough to hold the extra Buy Now Button...
Does anyone else have this or better yet any advice on how to fix??!
Thanks
Pete
Are you using column grid? I have the same problem. All the grid seems fall apart. But I manage to find the solution to this. Compare the two code before and after replace. Take out the product description code. Replace the class with the original class then wa la! Looks great!:clap:
Re: Buy now button in main page products
I have received several messages asking how I was able to get the mod offered by SOKI to work.
The answer is I did not, however, it seemed worth a try to look closely at the one he used as a starting point:
http://www.zen-cart.com/forum/showthread.php?t=123392
My explanation of the almost too easy solution for using it with NEW as well as FEATURED products is in this message:
http://www.zen-cart.com/forum/showpo...4&postcount=27
If you view the result at:
http://itsalljuststring.biz/
I did go on to modify some of the HTML to get the appearance I preferred.
It is not perfect, and there does seem to be an intermittent bug where the main page is not displaying on the first try, I am suspecting that is a different problem, because it is also occurring in my old site where this mod has not been applied.
http://www.ItsAllJustString.com
My thanks to SOKI because while I like what he did, it seem to conflict with other mods that were important to me and since he included the link to Dharam, I was able to "follow the directions" and accomplish "phase 1 AND 2"
HTE
Wheat
Re: Buy now button in main page products
Quote:
Originally Posted by
sw09
Are you using column grid? I have the same problem. All the grid seems fall apart. But I manage to find the solution to this. Compare the two code before and after replace. Take out the product description code. Replace the class with the original class then wa la! Looks great!:clap:
Can you post the script changes you made?
Its for my first site and i just want the buy now button to show on the New products main page.
www.scanhead.co.nz
Thanks
Re: Buy now button in main page products
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
Re: Buy now button in main page products
I just installed this on to my test shop, without any errors.
I modified the code for /includes/modules/new_products.php and /includes/modules/featured_products.php and neither page has changed at all.
I did the normal thing of closing down the browser and clearing all temporary files, but this did not make any difference.
Any help please?
Re: Buy now button in main page products
Quote:
Originally Posted by
darkmarauder
...
I modified the code for /includes/modules/new_products.php and /includes/modules/featured_products.php and neither page has changed at all.
...
Any help please?
Let me point out the error here. "neither page has changed at all"
The pages for the specials, featured, and new products pages do not change at all. This mod makes changes to these boxes on the main page only. If these are selected in the admin. These boxes are not selected by default in a standard ZC install. I hope this helps.
Re: Buy now button in main page products
Hi all!
I have installed this module for featured products and new products.
It works perfectly with featured products, but something does not work with new products when a product is sold out...
In the case of new products, when an item is sold out it shows the sold out image and after it a > sign; besides, it does not apply the <br/> and there is no space between the image and the product image.
I do not know if the explanation is clear... I hope so.
The website is: www.abedulart.com
Just refresh until a sold out product appears and you will see what I mean.
Any help?
Thanks!!
Re: Buy now button in main page products
I have the same problem with the ">" appearing in the case of a sold out item.
Any Ideas?
Thank you
Drunkguy
Re: Buy now button in main page products
When i use the buy it now options it now puts everything out of line. eg i get
buy it now button1
Image1 ............................. link to product 1
.......................................... buy it now 2
.......................................... image 2 .......................................... link to product2
instead of all being on one line as normal.
Re: Buy now button in main page products
This is a nice contribution I already applied it. but the questions is how to make the Buy Now button to go down instead of being first?