![]() |
"Buy Now" button without the "Quantity"
I would like to remove the "Quantity" drop down list. The purpose is to have users click on the "Buy Now" button with the default value of "1" to pass on to the shopping cart. How can that be done?
Searched for posts on this, haven't found any answers. Please help. :( Art |
You can edit out the quantity areas of your templates and instead use:
<input type="hidden" name="amount" value="1"> |
RE: "Buy Now" button without the "Quantity&qu
I got it. Thanks. This is the code from "customer/main/buy_now.tpl".
Art :) Code:
|
If you paste your entire ORIGINAL template I'll paste you back a version to use.
|
RE: "Buy Now" button without the "Quantity&qu
Okay, here it is "buy_now.tpl:
Code:
|
Try this:
Code:
{* $Id: buy_now.tpl,v 1.8.2.2 2004/12/09 12:42:16 max Exp $ *} |
RE: "Buy Now" button without the "Quantity&qu
Thank you. That really helped.
Art |
I would also like to get rid of the drop down quantity field but my code is different than the above, I tried to use the code jon gave but it did not work on x cart version, because when you clicked on buy now it directed you back to the xcart entry page ?
Here is my /customer/main/buy_now.tpl , can anyone please tell me what to take out to get rid of the drop down quantity and have a default of one item placed into the cart Quote:
Thanx Kirsten |
Hi Kirstin, I'm still awaiting your purchase of ezCheckout/ezUpsell ;)
Try this code. Be sure to back first as it's hard for me without testing the code. Code:
{* $Id: buy_now.tpl,v 1.15.2.7 2004/12/01 15:15:49 mclap Exp $ *} |
Thanx Jon that worked!!!
Just one small thing there is now a large break where the quantity drop down box used to be and the buy now button is not centered How can i adjust this?? www.silverimports.com.au/shop/home.php Thanx kirsten Ps I will be contacting you regarding the ezupsell and ezzcheckout very soon, I just want to get all the small changes done here first |
Look forward to hearing from you. I'm not sure if the result of the space is in this template, or if it's in currently template. But try the code below and see if it fixes it.
Code:
{* $Id: buy_now.tpl,v 1.15.2.7 2004/12/01 15:15:49 mclap Exp $ *} |
Okay that did the trick to get rid of the gap however the button is still aligning to the left hand side of the box and is not centered under the pricing details
Also if a customer is logged in both the buy now and wishlist buttons fall on the same line side by side I would like them to fall under one another and be centerred, with the buy now button on top maybe it is the whislist button that is somehow causing the buy now button to default to the left hand side ?? What do you suggest? Thanx Kirsten |
Try this :)
Code:
{* $Id: buy_now.tpl,v 1.15.2.7 2004/12/01 15:15:49 mclap Exp $ *} |
Okay Jon almost there
This new tpl edit works fine for both the buy now and wishlist buttons and it now centered correctly for both logged in and guest customers However I have one other issue that it does not work for I have some items which are available for purchase by special order so instead of having a no price or please enter your price showing there I changed the language on this to read Special Order Email Us for more details. with a link to email me straight away So is it possible to not have the buy now button or the add to cart buttons attach itself to those products with no price but still have the ability to have them added to wishlist if the customer is logged in??? As ideally that is the way I would like them to work If you have a look at my home page I have one product there that has a no price but with the email link and i do not want the buy now button or add to cart button if the customer goes to see more details to be an option for this item www.silverimports.com.au/shop/home.php Thanx Kirsten |
Try this:
Code:
{* $Id: buy_now.tpl,v 1.15.2.7 2004/12/01 15:15:49 mclap Exp $ *} |
Well almost done
The buy now button does not show for products that have no price the wishlist button does show for customers that are logged in for items with no price , but the link does not work to actually add it to the wishlist If you look at this page you will see the details of products that have no price, there I have the add to cart button showing which I do not want to show up for items with no price and for all products i do not want that quantity drop down menu to show up just have it set as a default of one when a person clicks on add to cart www.silverimports.com.au/shop/product.php?productid=16192&cat=0&page=1 The last minor thing I want to do is for the products with no price , if a customer clicks on email us is it possible to have a default subject enterred for the email that relates to the product they are interested in so that there is no confusion as to what product they are enquiring about and saves the customer time to type in item # and name?? if this is so how do i add this to the href link for the email? Thanx Kirsten |
Wow, I hope Jon is getting paid for this :)
|
If the wishlist does not work to add the product to the cart, then it is a limitation of x-cart which would require extra programming and cannot be provided through instructions as testing to find the correct code would be required.
In order to edit the product pages and remove the add to cart button on those pages, you'd have to edit product.tpl You'll have to work some of this out yourself or purchase some custom programming :) You can use this in a mail tag: <a href="mailto:Company Name <youremail@domain.com>?subject=EMAIL TITLE - {$product.product} - {$product.productid}"> |
Yes Jon has been extremely helpful!!
He has helped me achieve some changes that I would not have been able to do without many fatal errors of which I have become accustomed, and have then had to inlist the techs at Qualiteam to ressurrect my site! But slowly I am getting some order into the way I want my site to run and look even though it is still very much a straight x cart site with no major changes in the original template design wise. For that I will definately need to commission a design expert, but in the meantime..... I am feeling a bit better about my site now and I think I have come quite a long way in just over three weeks ( although very arduous and stressful ones!! ) LOL I am sure most of the experts here laugh and think omg how dumb is this woman at some of the posts and questions I have made BUT - you never know some of my little questions and dilemmas may actually be of help to others whom also have no knowledge or experience :D Thanx again to all the ppl who have given me advice and have helped me by answerring some of my questions Kirsten This is how my eyes are 8O after too many long nights! |
Quote:
Hi. I have made this change as suggested and it works fine. However, when an item has sold out, obviously the 'Buy Now' button is no longer shown which is fine, but I still need the 'Out of Stock' text to show instead of just a blank space where the 'Buy Now' button was. How can I achieve this? I also need to make exactly the same changes (ie. to lose the 'quantity dropdown' and yet still display 'out of stock' when sold out) to the 'Add to Cart' button displayed in the individual product listings. I have searched and searched the forum but cannot find anything that applies to this particular issue. |
Can anyone help with the request above...?
thank you |
Someone MUST know how this can be done...???
|
Quote:
I'd like to do something like this, but only for certain products. Is there a way to limit this to particular produtcs only? To show the quantity for some and for others to set it to default of 1? Thanks. |
this was excellent. worked nice.
anybody know how to remove quantity from product detailes. Tron |
Quote:
Hi all, I'm new to this forum. See my code below - i know it isn't the best but it works :D |
Quote:
QUANTITY ONLY FOR CERTAIN PRODUCTS IN PRODUCT DESCRIPTION ONLY! If the product ID is 666 or 667 the quanity dropdown menu will not apear! Customize at will! You got to put 2x {if} tags in the "product.tpl". But watch out - i worked on version 3.5.2! The 1st one: Code:
{if $product.productid eq 666 or $product.productid eq 667} And the 2nd one (with the default amount variable = 1 before the {if} tag): Code:
Quote:
To remove quantity from product details just comment out (HTML comment) or delete all the lines between the two {if} tags. Hope i helped you guys out a bit! Don't blame me for bad code - I'm a newbie to X-Cart. |
Will this code pasted on the first page affect the categroy pages or the product pages .. or both ?
We wouldn't mind getting rid of the quantity dropdown on the category pages but are a bit hesitant to remove them from the product page. |
Quote:
This code pasted in the correct place in "product.tpl" affects only the product description, not the category menu. But if you add a "Product Option" to a product the quantity will disapear from the category menu too! If you wan't it to disappear from only certain products in the category menu you got to do it on your own :P I think you can use the {if} tags in "buy_now.tpl" (like i did in "product.tpl") to remove the quantity. |
Quote:
And how _do _ I get it to dissapear from only the category page ?? |
[quote="maerik"][quote="Steele"]
Quote:
WORKS. I replaced this code: Code:
<SELECT id="product_avail" name="amount"{if $active_modules.Product_Options ne '' && $product_options ne ''} onchange="check_wholesale(this.value);"{/if}> with this: Code:
<input type="hidden" name="amount" value="1"> and deleted this to delete the "Quantity" before the box. Code:
<TR><TD height="25" width="30%">{$lng.lbl_quantity}{if $product.min_amount gt 1} |
Thank you
Thank you for the info.
|
Here's my Buy_now.tpl, can anyone reply with a code i can use?
I want remove the quantity and make default 1, and also center the Buy NOW button.. any help will be appreciated very much Code:
{* $Id: buy_now.tpl,v 1.15.2.7 2004/12/01 15:15:49 mclap Exp $ *} |
Guys, im confused i dont have anything like this
My buy_now.tpl look like this
{include file="buttons/button.tpl" button_title=$lng.lbl_buy_now href=$href title=$title style=$style} It there a mod or add on that i am missing? Would love to eliminate the quanity option when selecting buy it now. But some people reference the products.tpl and others are working on the buttons.tpl file. While this thread deals with the buy_now.tpl Help please.... :roll: xcart- 4.0.16 |
You need to read the whole thread...there is code that you need to replace in order to hide the quantity select box.
|
Balinor,
I have read the whole thread a couple of times checking to see where changes have been made but my original .tpl files dont look like any posted here. I have also cut and pasted code to try these changes to only get a big server error message. I have tried modifying the button, buy_now and product tpl files but i cant get them to work. Newbie here seeks enlightnment. 8O |
Ok,
Well i found that there are a couple of buy_now.tpl, after geting the correct one, "customer, Main, ..... buy_now.tpl i pasted the code from Jon and it appeared to work except when i hit the buy now button it would goto the store home.php and not the summary page. :?: |
to remove qty dropdown and text, i found it much easier to do it this way:
create your own buy now or add to cart gif include it where you want it in product.tpl use this code for your hyperlink [img]{$ImagesDir}/addtocart.gif[/img] then just comment out or erase this entire table Code:
<!-- this will affect your wishlist stuff, feature comparisons and downloadable products, but if you don't use these it shouldn't be a problem. works well in 4.0.18, and seems to be an easier solution that the others i saw, and you can incorporate your custom add to cart button, b/c the default x-cart ones are lame. -mike[/code] |
All times are GMT -8. The time now is 02:03 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.