| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Remove Quantity on Details Page | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() I've got one product on the whole site that is used as a Deposit, it's a single item purchase, so I don't need customers selecting quantities.
I'd like to hide the Quantity and the Drop Down. I'm pretty sure I need this: $product.productcode eq 'Deposit' But I don't know where to put it. I've tried putting it on the product_details.tpl but I'm doing something wrong. I've been modifying the common_files version, because I'm using the 3-column template and there's not product_details.tpl in the 3-column folder.
__________________
X-Cart 4.3 Joomla Among other things ![]() |
|||||||
#2
|
|||||||||
|
|||||||||
![]() If it's not there then it will use the one from common_files. Copy the file to the same place in 3-columns and edit it there.
![]() |
|||||||||
#3
|
|||||||
|
|||||||
![]() the quantity box code is in buy_now.tpl.
what i did was create a div class around the quantity box called "hidden" with the css code "visibility:hidden". this will keep the quanitiy box there( which is necessary to add to cart) but hides it from view. you can also add a margin-bottom: -30px within the "hidden" css if your worried about the empty space so that that "buy" button moves up the fill the gap.
__________________
xcart 4.4.3 |
|||||||
#4
|
|||||||
|
|||||||
![]() a333,
I removed the Buy Now feature from the site. I'm speaking specifically about the drop down on the product details page. See my current example: http://www.mikeinfinger.com/demos/xcart/Party-Deposit.html The whole quantity section has bee removed with the exception of the 1, which I will probably use your "hidden" css to take care of that. My next problem is after adding it to the cart, they can now change the quantity. I've breifly looked into it, but I cannot figure out which tpl to modify to "hide" the option to increase the quantity, using my if/then statement I should be able to only hide it for the Party. Here is a regular product with the quantity showing: http://www.mikeinfinger.com/demos/xcart/Monster-Caramel-Chocolate-Apple-Cashew.html
__________________
X-Cart 4.3 Joomla Among other things ![]() |
|||||||
#5
|
|||||||||
|
|||||||||
![]() The template can very depending on the skin, thus please try the "Webmaster mode". It should help locating the proper template.
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful ![]() Click here to learn how to apply patches X-Cart Extensions |
|||||||||
#6
|
|||||||
|
|||||||
![]() Thanks Alex, my mod seems to be working well on my 3 Column template. Nice to see you posting
![]()
__________________
X-Cart 4.3 Joomla Among other things ![]() |
|||||||
#7
|
|||||||||
|
|||||||||
![]() Quote:
can you show your code?
__________________
X-Cart version 4.4.3 |
|||||||||
#8
|
|||||||
|
|||||||
![]() Bringing back an old thread of mine with the code.
Modify this file: skin/common_files/customer/main/product_details.tpl The following code removes the SKU # and Quantity Options from the Product Details Page: (I had to take out the first 37 lines because it was to long to post) Code:
__________________
X-Cart 4.3 Joomla Among other things ![]() |
|||||||
#9
|
|||||||
|
|||||||
![]() In this version, you can see where I started right after the Options Label around line 120. I also disable the SKU #, but that code is not shown. Inserted {if} statements to determine whether or not the $product.productcode = 'Party Deposit1'. If it was, it disabled a warning message and hides of the quantity input and makes it a quantity of 1.
Code:
__________________
X-Cart 4.3 Joomla Among other things ![]() |
|||||||
#10
|
|||||||
|
|||||||
![]() I also figured out that if you open /common_files/customer/main/cart.tpl and put {*}around line 77 that it turns off the ability for the customer to change the quantity. I assume there's probably some way to if/then/else it based on the $product.productcode, but I haven't tried it yet. If I figure that out, I'll post it.
Code:
On a side note, putting {*} around Line 134 in the cart.tpl hides the "Estimate shipping" link in the Cart. Code:
__________________
X-Cart 4.3 Joomla Among other things ![]() |
|||||||
|
|||
X-Cart forums © 2001-2020
|