Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Making a change to Cart.php

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 11-24-2015, 07:42 AM
 
ppi ppi is offline
 

Newbie
  
Join Date: Jan 2015
Posts: 4
 

Default Making a change to Cart.php

We are using X-Cart 4.7.4 and due to many modifications, I cannot upgrade it. It works well, but here is one change my clients would like to me to make that I cannot figure out.

On the cart page it has 3 columns, Item, Price and Subtotal - however, a user can only buy 1 of any product so this Price x Quantity function is unnecessary. Not only unnecessary but the client wants it gone as to avoid confusion. Right now if someone tries to up the quantity the cart does it's job and lets them know they can only order one, but my client wants to avoid them even doing that.

So, the question is: How do I get rid of the quantity box and the apply button? I've looked through webmaster mode, gone through php files and cannot find this. We're even game to remove the whole Price column and just have Item and Subtotal, if that's doable, but again the where baffles me.

I'm attaching a screen shot of what we want gone for clarification
Thank you in advance
Attached Thumbnails
Click image for larger version

Name:	quantity and apply.PNG
Views:	173
Size:	4.0 KB
ID:	4382  
__________________
4.6
Reply With Quote
  #2  
Old 11-24-2015, 09:17 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Making a change to Cart.php

It looks like you are using Ideal Responsive, or possibly Ideal Comfort as a skin.

The file you are looking to change is customer/main/cart.tpl

Look for a piece of code similar to this: {foreach from=$products item=product name=products}

This is likely the start of the foreach code that loops through the products in the cart.

Inside this foreach loop you should have a "<div class="price">" which is the div where the price is contained. You will probably see something similar to the following contained within:
Code:
{if $active_modules.Egoods and $product.distribution}1<input type="hidden"{else}<input type="text" size="3"{/if} name="productindexes[{$product.cartid}]" id="productindexes_{$product.cartid}" value="{$product.amount}" />
I'd remove the if statement and just keep the input field hidden. Just needs to be experimented with in this section.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:47 AM.

   

 
X-Cart forums © 2001-2020