Bixie Forum

This is the forum for the free Bixie extensions and general questions.
Bixie customers can use the Support Center for their support questions.

You can visit the old forum here.

Holiday break

Due to holiday, the Bixie Support Center will be closed from 26-08-2010 untill 15-09-2010.

After that we will be glad to help you again.

Welcome, Guest
Please Login or Register.    Lost Password?

Changing the product quantity with your form
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Changing the product quantity with your form
#314
Changing the product quantity with your form 1 Month, 1 Week ago  
To control the number of products that are added to cart when ordering via the from, you must add a quantity-selector to your form, en let your javascript add the correct value in the VirteMart quantity box.

Put an input or select with the quantity in your form. Set the ID to "form_qty".
Code:

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">Quantity</label>
    <input class="cf_inputbox required validate-number" maxlength="10" 
         size="30" title="Please enter a valid number" id="form_qty" 
         name="quantity" type="text" onchange="processform()" value="1" />
  
  </div>
  <div class="cfclear">&nbsp;</div>
</div>



Then add these lines to your form-javascript:
Code:

function processform() {
    var quantitybox = $('quantity'+<?php echo JRequest::getInt('product_id',0); ?>);
    var qty = $('form_qty').value;
    quantitybox.value = qty ; 
}

malles
malles
Admin
Posts: 144
graph
User Online Now Click here to see the profile of this user
Last Edit: 2010/07/30 14:05 By malles.
The administrator has disabled public write access.
Bixie customers can use the Support Center for their support questions.
 
#316
Re:Changing the product quantity with your form 1 Month, 1 Week ago  
Thank You!

This should probably be put in the general forum in case others need it?
mowlman
mowlman
Posts: 12
graphgraph
User Online Now Click here to see the profile of this user
The administrator has disabled public write access.
 
#319
Re:Changing the product quantity with your form 1 Month ago  
mowlman wrote:
This should probably be put in the general forum in case others need it?
That's why it's posted here
malles
malles
Admin
Posts: 144
graph
User Online Now Click here to see the profile of this user
The administrator has disabled public write access.
Bixie customers can use the Support Center for their support questions.
 
Go to topPage: 1

Login Members