Using v6.3 and modified most of the script to turn the Shopping Cart into a basic Materials Picker.
I have basic pHp knowledge, so please be gentle, and trawled through what was required (learning quite a bit on the way!!), but now need something that is just outside my capability and looking for help/pointers......
I need a way to input QUANTITY at the products page BEFORE adding to cart. Although QUANTITY and SAVE operate within the basket fine, I require it done this way due to how the site is going to be used out in the field.
I have tried looking through forum, but can only find snippets of info, and all relating to older versions, of what I actually need.
In the main product view, it is easy. Just change the type of input (iQuantity) from "hidden" to "text" in templates/default/product.php Then give it an ID or class and format it the css.
In the products list view, it is a bit more difficult, because there is no form to send the data through POST, the variables iProduct and iQuantity ("hard wired" to 1) are given through GET in the address link. (just move with the mouse over the link and observe the status bar in the browser - you will see the address and ID of iProduct and the iQuantity set to 1).
The easiest but dirty ;-) solution is to use a line of js code in the tag <a> which gives the above mentioned link. We change with onclick event the value of iQuantity.
In the core/products.php in the function listProducts find:
Many thanks for that boboo, but did not work right for me - think it is because I had extra field on products page and everything go messed up......
I have done a work around by removing the "Add To Basket" from the products list page. Now, the user clicks on the product in the list (via the image link), where they are taken to the product information page, and using the information you gave in the first part of your post, the quantity is adjusted before being added to basket.