PDA

View Full Version : Removing/hiding quantity field


cre8ive
09-08-06, 09:02 PM
Most of my client's products' quantities are specified in the attributes, so the "quantity_1" field is confusing. I managed to hide it in the category page, but the product pages still show it.
There's only one product that is sold on an "each" price, so I need to remove or hide it in the other products.
Any suggestions?

Thanks,
Ilene:)

Vic - WolfPaw Computers
09-08-06, 09:12 PM
Create a conditional statement in your PROD page Product Display Listing section.

Find where the quantity box is drawn, and setup a conditional that if the product code is the one that requires quantity, to show the box, else do not show the box.

cre8ive
09-08-06, 09:23 PM
I have no idea how to set up a conditional statement, but that's exactly what I need!

Is it that difficult to do?

Vic - WolfPaw Computers
09-08-06, 09:32 PM
Fairly simple once you understand the StoreMorph scripting syntax.

<mvt:if expr="l.settings:product:code EQ 'prod code'">
display quan box
<mvt:else>
do not show box
</mvt:if>

Substitute prod code with the actual products code.

cre8ive
09-08-06, 10:47 PM
I tried, b;ut it didn't work...

replaced:
<mvt:if expr="l.settings:product:quantity EQ 0">
<i>None</i>
<mvt:else>
<b>&mvt:product:quantity;</b>
</mvt:if>

with:
<mvt:if expr="l.settings:product:code EQ RE1000">
display quan box
<mvt:else>
do not show box
</mvt:if>

what did I do wrong? :confused:

cre8ive
09-08-06, 10:53 PM
it's this item I want to change to be shown for 1 product only.

Quantity:
<input type="text" name="Quantity" value=1 size=4>

;)

Pete McNamara
09-08-06, 11:08 PM
Looks like you have left out some quote marks:

'prod code'

cre8ive
09-08-06, 11:35 PM
that's for the quantity in basket item. I need to edit the quantity box that's next to the "add to basket" button.

Pete McNamara
09-09-06, 12:15 AM
I'm confused. You say you want to hide the quantity box originally, now you say you want to change (i.e. edit) it. What do you want to do - hide it or change it?

cre8ive
09-09-06, 12:32 AM
Hide it for all but 1 item. The code you game me was for the upper "quantity in basket" shown with the product code. I want to hide the one that appears at the bottom, next to the "add to basket" button. It will be confusing to the customer, as they are already choosing the quantity with one of the attributes. (Different quantities = different $$). ie: if they choose to purchase 50 through an attribute option, then go to the bottom and enter 50 again, they are actually purchasing 2500. understand what I'm trying to do?

Pete McNamara
09-09-06, 01:23 AM
So this:

<mvt:if expr="l.settings:product:code EQ 'RE1000'">
<tr>
<td valign="middle">
<mvt:item name="fonts" param="body_font">
Quantity:
</td>
<td valign="middle">
<input type="text" name="Quantity" value=1 size=4>
</td>
<td valign="middle">
<mvt:item name="buttons" param="AddToBasket" />
</mvt:item>
</td>
</tr>
<mvt:else>
&nbsp;
</mvt:if>

doesn't work?

cre8ive
09-09-06, 05:01 PM
Hi Vic,
I can't thank you enough for your help with this. I'm frustrated beyond belief, and usually I can figure this stuff out, but not this one. It's almost where I need it.

Your code takes the "quantity" AND the "add to basket" off all items. I need the "add to basket" on all items so it will add it to the shopping cart, and just the quantity field on the RE1000. No quantity field is desired on any other items.

Thanks,
Ilene

Pete McNamara
09-09-06, 10:15 PM
Try this instead:

<tr>
<td valign="middle"><mvt:item name="fonts" param="body_font">
Quantity: </td>
<mvt:if expr="l.settings:product:code EQ 'RE1000'">
<td valign="middle"><input type="text" name="Quantity" value=1 size=4>
</td>
<mvt:else>
<td>&nbsp;</td>
</mvt:if>
<td valign="middle"><mvt:item name="buttons" param="AddToBasket" />
</mvt:item>
</td>
</tr>

Vic - WolfPaw Computers
09-09-06, 10:47 PM
Actually it was Pete that was offering the code.

I just tried to point you in the right direction to teach yourself :)


Hi Vic,
I can't thank you enough for your help with this. I'm frustrated beyond belief, and usually I can figure this stuff out, but not this one. It's almost where I need it.

Your code takes the "quantity" AND the "add to basket" off all items. I need the "add to basket" on all items so it will add it to the shopping cart, and just the quantity field on the RE1000. No quantity field is desired on any other items.

Thanks,
Ilene

cre8ive
09-09-06, 11:02 PM
Sorry guys, it's still not working right.....ugh! It's the same on all products, took out the actual "field" for quantity but left the word "quantity". Word and field need to be on RE1000 only.

Take a look...I left the most recent code in there.

http://67.99.200.192/mm5/merchant.mvc?

Thanks Pete AND Vic....
Ilene

Pete McNamara
09-09-06, 11:32 PM
Try moving the start and finish of the conditional until you get what you want.

You need to learn how to do this yourself - it will help you later. Just compare the 2 versions of the code I gave you above and that will show you what you need to do to get what you want.

cre8ive
09-10-06, 03:46 PM
I AM trying to learn it, but not getting very far. Will keep trying thanks for your help.

Ilene