Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
Forum Search
Google Site Search
 All Forums
 Technical
 PHP (Unix / Linux / Apache) versions
 Additional "Add to Cart" Button
Author « Topic »  

sjones1787
Starting Member

USA
35 Posts

Pre-sales questions only
(More Details...)

Posted - 04/19/2018 :  17:21:19  
Is it possible to code an extra "Add to Cart" button in the product description area?

I'm working on a site where the description is a little long and the "Add to Cart" button is in the bottom left corner. We would like to add another button in the product description area if possible.

Here is a link so you can see what we are dealing with. [url]http://readivac.com/2018/proddetail.php?prod=RVS[/url]

Let me know your thoughts, any input is appreciated. This site is just in development phase now. Not completed!

S Jones

Sinbad
ECT Moderator

USA
65937 Posts

Posted - 04/19/2018 :  20:21:21  
Hi S Jones, in the vsadmin/includesphp add the following parameter $proddetailtopbuybutton=TRUE;

Winners never quit, quitters never win
CSS and Responsive Designs
User Manual for Ecommerce Templates

sjones1787
Starting Member

USA
35 Posts

Pre-sales questions only
(More Details...)

Posted - 04/20/2018 :  05:52:09  
I should have mentioned that I tried that. I read that in your forum and it did not work for me. Upon your advice I added $proddetailtopbuybutton=TRUE; to the includes.php file in the vsadmin directory again and I get the same result - no add to cart button at the top.

I have also tried adding the follow code to the product description

[code]
<div class="detailquantity"><div class="detailquantitytext">Quantity:</div>
<div class="quantity0div detailquantity0div"><input type="text" name="quant" id="w0quant" size="2" maxlength="5" value="1" title="Quantity" class="quantity0input detailquantity0input">
</div>
</div>
<div class="addtocart detailaddtocart"><input type="button" value="Add to cart" class="buybutton detailbuybutton" onclick="subformid(0,'','')"></div>
[/code]

I can get it to add a product to the cart but the quantity is always "1" regardless of what I input. It would be nice if I could get your original fix to work, but as of right now it is not working. Any thoughts?

S Jones

Edited by - sjones1787 on 04/20/2018 05:54:01

Andy
ECT Moderator

95440 Posts

Posted - 04/20/2018 :  06:26:56  
Hi

You can't add an add to cart button in the product description.

If you are using the detail page layout feature you can choose where the buy button goes in the layout https://www.ecommercetemplates.com/help/css-layouts.asp#proddetailorder

Andy

Please feel free to review / rate our software

sjones1787
Starting Member

USA
35 Posts

Pre-sales questions only
(More Details...)

Posted - 04/20/2018 :  06:40:52  
Hello, I have added this to the includes.php file
[code]
// Custom Options
$proddetailtopbuybutton=TRUE;
$productpagelayout='addtocart, productimage, productid, sku, productname, manufacturer, discounts,
reviewstars, instock, custom1, description, options, listprice, price, currency, quantity, dateadded, custom2';
$detailpagelayout='navigation, checkoutbutton, addtocart, productimage, productid, manufacturer, sku,
productname, discounts, instock, description, listprice, price, quantity, currency, dateadded, options, previousnext, emailfriend, reviews, socialmedia';
[/code]
I'm still not able to get the "Add to cart" button at the top of the page. Software = PHP v6.8.5 - Any thoughts?

S Jones

Edited by - sjones1787 on 04/20/2018 06:44:20

Andy
ECT Moderator

95440 Posts

Posted - 04/20/2018 :  07:01:22  
You've moved that addtocart to the top of the products page but I thought you were referring to the detail page?

Andy

Please feel free to review / rate our software

sjones1787
Starting Member

USA
35 Posts

Pre-sales questions only
(More Details...)

Posted - 04/20/2018 :  09:23:57  
Doesn't this code put it on the product details page?
[code]
$detailpagelayout='navigation, checkoutbutton, addtocart, productimage, productid, manufacturer, sku,
productname, discounts, instock, description, listprice, price, quantity, currency, dateadded, options,
previousnext, emailfriend, reviews, socialmedia';
[/code]
I was just thinking that putting it in front of the productimage would put it at the top.
As you can see I'm a little confused. Can you point me in the right direction?

S Jones

Andy
ECT Moderator

95440 Posts

Posted - 04/20/2018 :  09:27:15  
Sure, that is correct fr the detail page, it's just your last post was an example for the product layout. Where do you see the add to cart button now on the detail page?

Andy

Please feel free to review / rate our software

sjones1787
Starting Member

USA
35 Posts

Pre-sales questions only
(More Details...)

Posted - 04/20/2018 :  09:33:37  
Andy, this was included in my previous post. I had changed both the products page and the products detail page.
However, it's not working the "Add to Cart" button is still at the bottom.
[url]http://readivac.com/2018/proddetail.php?prod=RVS[/url]
Please look and let me know what else I can do to make it go to the top.

S Jones

Andy
ECT Moderator

95440 Posts

Posted - 04/20/2018 :  09:42:00  
That's certainly not the order showing on your detail page, can you check there is just one instance of $detailpagelayout and that is definitely in the includes.php file in your main 2018/vsadmin/ folder?

Andy

Please feel free to review / rate our software

sjones1787
Starting Member

USA
35 Posts

Pre-sales questions only
(More Details...)

Posted - 04/20/2018 :  11:29:24  
You were correct in your assumption of duplicate entries for $detailpagelayout. I found two of them,
one that I added at the top and one was already there - $GLOBALS['detailpagelayout']. I'm just going to
modify the $GLOBALS['detailpagelayout'] listing and I'm getting results.
Thank you for your patience and pointing me in the right direction.

S Jones
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.03 seconds. Snitz Forums 2000