Jump to content

Removing Product Quantity on ViewProd.tpl


Guest paulabakerparkin

Recommended Posts

Guest paulabakerparkin

Hello,

I would like to remove the quantity box on the product page as my product options specify the amount needed, thus making the quantity box redundant. I have tried to just delete it, but it is attached to code that helps to place the product into the cart.

I am also trying to move the add to basket button to button when I move it the button disappears. I presume it has something to do with the <form> tag.

Can anybody help?

Paula

Link to comment
Share on other sites

Both can be done in viewProd.tpl. Visit www.vitaminlink.net/cart and you'll see I've moved my add to basket to the top. Here's part of the code:

<!-- BEGIN: view_prod -->

<div class="boxContent">

<!-- BEGIN: prod_true -->

<!-- <strong>{LANG_DIR_LOC}</strong> {CURRENT_DIR} -->

<p class="notify">{CART_FEEDBACK}</p>

<form action="{CURRENT_URL}" method="post" name="addtobasket" target="_self">

<p>

<strong>{LANG_PRICE}</strong> {TXT_PRICE}

<strong> Vitaminlink Price: </strong> <span class="txtSale"><strong>{TXT_SALE_PRICE}</strong></span>

</p>

<ul>

<li class="bulletLrg"><a href="index.php?act=taf&productId={PRODUCT_ID}" target="_self" class="txtDefault">{LANG_TELLFRIEND}</a></li>

</ul>

<!-- BEGIN: prod_opts -->

<br />

<strong>{TXT_PROD_OPTIONS}</strong>

<table border="0" cellspacing="0" cellpadding="3">

<!-- BEGIN: repeat_options -->

<tr>

<td><strong>{VAL_OPTS_NAME}</strong></td>

<td>

<select name="productOptions[]">

<!-- BEGIN: repeat_values -->

<option value="{VAL_ASSIGN_ID}">

{VAL_VALUE_NAME}

<!-- BEGIN: repeat_price -->

({VAL_OPT_SIGN}{VAL_OPT_PRICE})

<!-- END: repeat_price -->

</option>

<!-- END: repeat_values -->

</select>

</td>

</tr>

<!-- END: repeat_options -->

</table>

<!-- END: prod_opts -->

<div>

{TXT_INSTOCK}<span class="txtOutOfStock">{TXT_OUTOFSTOCK}</span>

<strong>{LANG_PRODCODE}</strong> {TXT_PRODCODE}

<!-- BEGIN: buy_btn -->

<div style="position: relative; text-align: right;">{LANG_QUAN}

<input name="quan" type="text" value="1" size="2" class="textbox" style="text-align:center;" />

<a href="java script:submitDoc('addtobasket');" class="txtButton">{BTN_ADDBASKET}</a>

</div>

<!-- END: buy_btn -->

Link to comment
Share on other sites

Paula, one thing I've noticed in you code work, and this one small thing will help you immensely once you get your head around it -

The "HTML comments" in these files are very important. They are not just comments when they look like this:

<!-- BEGIN: specialName --> and <!-- END: specialName -->

Those are parsing cues for php rendering of the XTemplate file, which is otherwise pretty much straight up HTML. When you are moving major elements like buy buttons, options, whatever . . . you need to make sure that the appropriate "comment cues" go with the section.

Sometimes the begin/end cues will introduce a loop of items drawn from the db, as with the news items you had probs with the other day. Be careful what you add inside the cues. They are very important, and an integral part of understanding how CubeCart code works ;)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...