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..

carpeperdiem 12-16-2007 05:26 PM

Re: how to delete this (with pic)
 
What is the product id for this product?

REMOVING the quantity box will be as I described... I would be happy to send you the code.

aquaimaging 12-16-2007 05:36 PM

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

aquaimaging 12-16-2007 11:05 PM

Re: how to delete this (with pic)
 
help

aquaimaging 12-17-2007 03:47 PM

Re: how to delete this (with pic)
 
now i removed the quantity box in product details, the problem is i have many products. how im gonna code this? pls teach me how.. I need my website soon..thanks

aquaimaging 12-17-2007 03:55 PM

Re: how to delete this (with pic)
 
Quote:

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

<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>
{/if}{* added for change qty to 1 for product 1 or 2 *}


it is possible to concat product id? because i have few products.. any help pls

carpeperdiem 12-17-2007 04:17 PM

Re: how to delete this (with pic)
 
You're on your way... yes, smarty will let you define a range of numbers...

http://smarty.php.net/manual/en/language.function.if.php

aquaimaging 12-17-2007 04:23 PM

Re: how to delete this (with pic)
 
oh i cannot get it.. maybe you can show me the codes, im really confuse on if else statement of smarty..

carpeperdiem 12-17-2007 04:27 PM

Re: how to delete this (with pic)
 
what are the range of product ids that you want included?

aquaimaging 12-17-2007 04:29 PM

Re: how to delete this (with pic)
 
i have 19 categories and there are 1 to 2 products every categories

carpeperdiem 12-17-2007 04:46 PM

Re: how to delete this (with pic)
 
aqua,

you didn't answer my question.

Quote:

what are the range of product ids that you want included?

LIST THEM, please.

aquaimaging 12-17-2007 04:49 PM

Re: how to delete this (with pic)
 
http://pisohost168.com/x-cart/xcart/home.php

this is the link of my website.. maybe you can figure it out.. what's wrong with it.. thanks carpeperdiem

aquaimaging 12-17-2007 05:02 PM

Re: how to delete this (with pic)
 
http://pisohost168.com/x-cart/xcart/home.php

This is the web site what im talking about... hope you can figure it out..

carpeperdiem 12-17-2007 06:36 PM

Re: how to delete this (with pic)
 
You're going to have to help yourself a little here...

1. LOSE the buy now on the category pages. Your products require options, so in your general settings>appearance, DISABLE: Enable "Buy Now" button in the products list:

AND -- in Product options options

A customer using the "Buy now" button to order a product with product options must be redirected to the product details: CHECK THIS BOX

2. Get familiar with the admin-- learn how to determine product ID (I gave it to you a few posts back)

3. Your header image is in serious need of repair... do you sell web design services? You are going to have difficulty getting clients with a logo that looks like that.

4. Your color palate...

The way this cart works: you're going to have to start flipping switches to see what happens... There is a steep learning curve on many levels.

Good luck.

aquaimaging 12-17-2007 06:46 PM

Re: how to delete this (with pic)
 
:) the logo i put there is for reference only its not final.. im just playing around..

aquaimaging 12-18-2007 12:17 AM

Re: how to delete this (with pic)
 
Quote:

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


i try to put elseif statement and its works but it's load slower, why?

and the quantity text is still there but the drop down is removed..

aquaimaging 12-18-2007 12:39 AM

Re: how to delete this (with pic)
 
problem solve but the quantity text are still there but the drop down are successfully removed.. pls visit this http://pisohost168.com/x-cart/xcart/home.php

aquaimaging 12-18-2007 04:09 PM

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

this things make me crazy why i can't delete i cannot find where to delete this

carpeperdiem 12-18-2007 04:18 PM

Re: how to delete this (with pic)
 
that would be a language variable -- probably

{$lng.lbl_quantity}

make it go away (or if/else it to only appear when you want it)

use webmaster mode, and you will never have to ask "what file is this in" again!

aquaimaging 12-19-2007 01:07 AM

Re: how to delete this (with pic)
 
thanks carpeperdiem..your the master


All times are GMT -8. The time now is 09:39 PM.

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