-
Buy now button in main page products
This thread will be the support thread for a new contribution/add on I make for adding a buy now button in main page products listing (New Products, Featured Products, Specials Products, etc...).
Instructions here: http://www.zen-cart.com/index.php?ma...oducts_id=1440
You can see the add on in action on my web site http://www.easytechnology.gr/index.p...ex&language=en
-
Re: Buy now button in main page products
haven't tested this yet but does it enable users to purchase a product directly rather than with any other items that may be in the shopping cart?
_thanks
-
Re: Buy now button in main page products
Add the product to shopping cart, if have more products in cart will not change them.
-
Re: Buy now button in main page products
Sweet Contribution...just what I was looking for. But can I position the button on the side of the image. I've been cssing for 42 hours straight and know it's somewhere...but if you have a shortcut, that would be amazing.
www.vapur.us/shop
I also wanted to display part of the description (like the specs of the product and attributes). I'll look into this and will hopefully have some feedback.
Thank you,
Michelle Carbone
-
Re: Buy now button in main page products
does this work with cross sell/xsell? or how can i make it work with this?
thanks
-
Re: Buy now button in main page products
Quote:
Originally Posted by
mcarbone
Sweet Contribution...just what I was looking for. But can I position the button on the side of the image. I've been cssing for 42 hours straight and know it's somewhere...but if you have a shortcut, that would be amazing.
www.vapur.us/shop
I also wanted to display part of the description (like the specs of the product and attributes). I'll look into this and will hopefully have some feedback.
Thank you,
Michelle Carbone
As I mention in the contribution is an extension to this original thread http://www.zen-cart.com/forum/showthread.php?t=123392 , he uses css and product description but i have not include those to my contribution to make it simplier for users to install it. So please take a look in the thread http://www.zen-cart.com/forum/showthread.php?t=123392
Hope you good luck
-
Re: Buy now button in main page products
Quote:
Originally Posted by
nyczhenry
does this work with cross sell/xsell? or how can i make it work with this?
thanks
This contribution is for the main page products displayed there for other sections in zencart need to modify the files
-
Re: Buy now button in main page products
i would also be interested in an add now button for my cross sell items. does anyone know how to do this?
thanks
-
Re: Buy now button in main page products
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
-
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
If you use some other contribution that modifies the main page may need to do some changes. For example I use also the column divider add on and have problems because some products had false product id, for example the real product id was 750 and when I clicked the buy now button in main page the product id was 71000.
I manage to overcome that by deleting this 2 lines
$r_params = str_replace("50", "100", $r_params);
$r_params = str_replace("33", "100", $r_params);
in includes/templaters/YOUR TEMPLATE/common/tpl_columnar_display.php
Please check if something similar happens to you with some other add on.
:smile:
-
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?
-
Re: Buy now button in main page products
if you have an item is out of stock does it show "Sold Out" or "Out of Stock" on the main page?
-
Re: Buy now button in main page products
I have got the button on the main module but its in the wrong spot. I want it all the way to the bottom under the price like as follows:
Image
Item Name
Price
then the buy now button
How can I put the button at the bottom instead of the top?
-
Re: Buy now button in main page products
Tried to install this in V1.5 and no workie, is it not compatible with this version ?
-
Re: Buy now button in main page products
Is this compatible with v1.5 yet?
-
Re: Buy now button in main page products
I loaded this code, but when I click the "buy now" it redirects me to the product page. how do I get it add the product to the shopping cart
-
Re: Buy now button in main page products
Do your Products have attributes? If so, then you will be taken to the product _info page ...
-
1 Attachment(s)
Re: Buy now button in main page products
I just installed this on ZC 1.5 and while it work, I seem to be having the same issue as others here. The BUY NOW button shows up above the product image/description etc. Sold out products show up with a Sold Out image but with a " > " symbol after the image. Are other folks having the same issue please share how they resolved it?Attachment 10440
-
Re: Buy now button in main page products
Quote:
Originally Posted by
kman55
I just installed this on ZC 1.5 and while it work, I seem to be having the same issue as others here. The BUY NOW button shows up above the product image/description etc. Sold out products show up with a Sold Out image but with a " > " symbol after the image. Are other folks having the same issue please share how they resolved it?
Attachment 10440
Not sure if people are still looking for a solution. I have v1.5 installed from new. No mods, just a new template.
Try this, it works for me:
Code:
$specials_index->fields['products_name'] = zen_get_products_name($specials_index->fields['products_id']);
$list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsSpecials centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"','text' => (($specials_index->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($specials_index->fields['products_id']), 'cPath=' . $productsInCategory[$specials_index->fields['products_id']] . '&products_id=' . (int)$specials_index->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $specials_index->fields['products_image'], $specials_index->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br />') . '<a href="' . zen_href_link(zen_get_info_page($specials_index->fields['products_id']), 'cPath=' . $productsInCategory[$specials_index->fields['products_id']] . '&products_id=' . $specials_index->fields['products_id']) . '">' . $specials_index->fields['products_name'] . '</a><br />' . $products_price);
Buy now is below everything now. But, I would like to put a quantity inbox too just above buy now button. Any ideas?
-
1 Attachment(s)
Re: Buy now button in main page products
I am still trying to figure out. I am trying to get my Add to Cart button at the very bottom under the price. No luck yet. Anyone?
Attachment 15929