Bob,
It's actually not QUITE as easy as that.
You may also want to check if the quantity is available in inventory
before putting it into the basket.
This is checked for qty=1 in screens/item to choose whether to display
"Add" or "Backorder" on the submit button. However, you'll have to check
it again in ADD_BASKET.
How you deal with insufficiant quantity is up to you. Consider the
possibility of having some available but some needing to be backordered.
I didn't solve this problem because I don't actually use inventory
(qty=100000). Thus, I have no code, but I agree it should be CVS'ed.
Van
On Tue, 20 Feb 2001, Bob Bennett wrote:
> Greetings,
>
> I've been trying to learn this as I go with little more than HTML background
> and I was trying to allow for a QTY to be input rather than initially adding
> 1 item to the basket and i seem to have got it to work .
>
> I would like to know if I have put other areas at risk as a result, or if
> this is just a false victory. (My solution seemed to be a little to easy for
> what I was expecting, but it works & calculates the total correctly). .
>
> In the "Item" Screen I simply added a text box named "qty_box" with an
> intial value of 1.
>
> Then in the "ADD_BASKET" action I changed the VALUE of "1" to recognize the
> value of "$qty_box" shown below:
>
> /* insert into basket
>
> $Query = "INSERT INTO session_sku (Session, SKU, Quantity, Notes) VALUES ";
>
> $Query .= "('$sid', $sku, 1, '$notes') "; ** Changed this line to -
> $Query .= "('$sid', $sku, 'qty_box', '$notes') ";
>
>
> Any comments or warnings would be helpful
>
> Thanks
> Bob Bennett
>
>
>
>
> ------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Site: http://www.working-dogs.com/freetrade/
> Problems?: [EMAIL PROTECTED]
>
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Site: http://www.working-dogs.com/freetrade/
Problems?: [EMAIL PROTECTED]