X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   how to delete this (with pic) (https://forum.x-cart.com/showthread.php?t=36126)

aquaimaging 12-12-2007 09:40 PM

how to delete this (with pic)
 
http://i91.photobucket.com/albums/k293/pindeho2005/how.gif

pls help how to delete this or how can i make the value 100, 101, 102 into 100, 200, 300, 400 etch... im newbie

DataViking 12-13-2007 03:46 AM

Re: how to delete this (with pic)
 
you can change the quantity in the admin side, but if you have other products i sugest to add a product option instead

artuli 12-13-2007 08:21 AM

Re: how to delete this (with pic)
 
I've been having the same question!

I used to know for 4.0, but it don't work no mo.
Oh, I slipped into verse. Sorry.

carpeperdiem 12-13-2007 08:42 AM

Re: how to delete this (with pic)
 
This is super easy...

in /skin1/customer/main/product.tpl

FIND:

Code:

<select id="product_avail" name="amount"{if $active_modules.Product_Options ne '' && $product_options ne ''} onchange="check_wholesale(this.value);"{/if}>
{section name=quantity loop=$mq start=$start_quantity}
<option value="{%quantity.index%}"{if $smarty.get.quantity eq %quantity.index%} selected="selected"{/if}>{%quantity.index%}</option>
{/section}
</select>


BEFORE this codeblock, insert:
Code:

{* BEGIN change qty to 1 for product 29 or 30 *}
{if $product.productid eq '29' or $product.productid eq '30'}
<input type="hidden" name="amount" value="1">
{else}
{* END change qty to 1 for product 29 or 30 *}


AFTER the </select> in the first codeblock, add:

Code:

{/if}{* added for change qty to 1 for product 29 or 30  *}

I used this for two products... product id 29 and 30. You will have to adjust for your own products.

NOW, if you have many products to do this for (i.e. your entire site) then simply replace the code...

The thing I learned is that a value must always be passed -- if it's 1 that's ok, but it must be a positive integer. So, make it hidden and constrain it to value="1".

OK?

aquaimaging 12-14-2007 12:24 AM

Re: how to delete this (with pic)
 
i removed the quantity box but when i click the details the quantity box is still there..

aquaimaging 12-16-2007 03:10 PM

Re: how to delete this (with pic)
 
help pls...

carpeperdiem 12-16-2007 03:12 PM

Re: how to delete this (with pic)
 
I gave it to you in post #4 (for product details)

aquaimaging 12-16-2007 04:36 PM

Re: how to delete this (with pic)
 
i done what you stated above but the quantity box in details are still there.. where can i find the product number? sorry for being noob.. thanks guys

carpeperdiem 12-16-2007 04:41 PM

Re: how to delete this (with pic)
 
If you are in the modify product page -- the url will look like:

/provider/product_modify.php?productid=34

That's your product id.

OR -- you can HOVER over the link to the product modify in the search results... and in your browser "status bar" it will tell you...

Unless your product id is set correctly, this code will not work.

aquaimaging 12-16-2007 05:14 PM

Re: how to delete this (with pic)
 
http://i91.photobucket.com/albums/k293/pindeho2005/howto.gif
this is what im telling.. i hope you could help me.. i know a bit in php and html but i can't figure it out and how im gonna do it.. maybe im just too noob for this..


All times are GMT -8. The time now is 01:15 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.