How can i change the quantity input box into a dropdown menu, I guess users will feel easier to click and select the quantity they want.
In advance i appreciate ur help.
How can i change the quantity input box into a dropdown menu, I guess users will feel easier to click and select the quantity they want.
In advance i appreciate ur help.
This will require some substantial code editing and probably a new field in the database too - and I don't think it makes sense anyway. MOST of the time, people only ever want ONE item, and don't think that customers are so stupid as to not know how to key in a different value if that's necessary.
20 years a Zencart User
You don't understand what people want. It doesn't require to create any additional fields in the database nor complex edition of codes. It requires only few lines of html.
Why it requires additional fields in the database , ? i don't understand. Here i am changing the way customer choose their value, instead of typing customer will feel much much easier to click and select the quantity. this is not adding another value to it/
find the text input box and replace with drop down menu. that's it. you got that stupid idiot ?
this forum is getting spoiled by people like you. If you don't know the answer don't waste your time looser.
May the fleas of a thousand camels infest your armpits.
You cannot do this with HTML. Zencart works with PHP. The variables will need to be stored in the database and PHP code will need to be written to call those variables, parse them into the form, and write the result.
You have (so far) just 2 posts. I have a few more than that...
I think I have a little bit of a head start on you.
20 years a Zencart User
And as you are SO clever,have a go at this:
... because that is just ONE PART of the code you will need to edit...PHP Code:<?php
if (CUSTOMERS_APPROVAL == 3 and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') {
// do nothing
} else {
?>
<?php
$display_qty = (($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($_GET['products_id'])) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($_GET['products_id']) . '</p>' : '');
if ($products_qty_box_status == 0 or $products_quantity_order_max== 1) {
// hide the quantity box and default to 1
$the_button = '<input type="hidden" name="cart_quantity" value="1" />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
} else {
// show the quantity box
$the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '<br />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
}
$display_button = zen_get_buy_now_button($_GET['products_id'], $the_button);
?>
<?php if ($display_qty != '' or $display_button != '') { ?>
<div id="cartAdd">
<?php
echo $display_qty;
echo $display_button;
?>
</div>
<?php } // display qty and button ?>
<?php } // CUSTOMERS_APPROVAL == 3 ?>
20 years a Zencart User
And from the above, you will also see the complexities involved in dealing with product Minimum Quantity (set in the product add/edit screen - with the relevant value entered there most certainly being stored in the database), and how the "Add to Cart" displays subsequent values for an item that is ALREADY in the cart.
This is indeed a complex issue and you should be thankful that the stupid idiot schoolboy has pointed that out to you.
That's way too broad a claim to make. It may apply to certain kinds of products but not at all to others.
Sounds like you know what to do. Why not go ahead and do it?
I believe the term you're looking for is "loser". Schoolboy may or may not be looser than most, but we have no way of knowing that.
Rob
In the company of attractive single women I think I can be a bit loose...
... but to admit also, it's situations like this that I can also be more of a loser![]()
20 years a Zencart User
Hi,
Can anyone help me with this.... and very new to zencart and php.
Basically, my requirement was: For a product, I have to calculate the price depending upon the values entered by the user and that price selected by the user should be become unit price.
To achieve that, I created the attributes for the product(baseprice=$0.00). I collected the values entered in those attributes text field using javascript in the tpl_modules_attributes.php page. An ajax calculate button would post those values to the CalculationScript.php where i calculate the price of the product and display the price table(which displays prices and quantity and days of shipping accordingly).
Upon the selection of one price and Addcart event, corresponding values of Unitprice, quantity, days of shipping should be reflected in the corresponding values of Shopping cart.
I able to overwrite the Unit price..by manuplating final prcie but not quantity and totals.. can anybody please give me some suggestions... !!!how to modify the quantity? and days of Shipping..? Plz iam pretty much in the bad. shape.. !!!
Thanx in advance.