Good question... I dunno what is the answer to that question. I'll do some research in Google and get back to you if I discover an useful answer. You should email the people at iPage as they probably could assist you..
When I put a product I'm using the quantity in the products table to define how much I have in stock.
The quantity in the lot should be deducted from the quantity in the products table.
I use the quantity of the lot as the value I give in the table products_options_values field products_options_values_name.
When I select a value I want that to act like if I'm changing the quantity in my shopping cart.
Does that makes any sense to you? Or should I try and explain it in a different way? Did you look at the other thread I started? I'm hoping it will help understand what I need to do.
Thanks for you help and an answer is very very very appreciated as it's been driving me nuts for a few days now..
The iPage site is not online yet, I'm working on that locally on my machine..
This is the way I think you need to approach it:.
1) In checkout_process.php you will need to amend:.
$stock_query = tep_db_query("select products_quantity from "TABLE_PRODUCTS" where products_id = '"tep_get_prid($order->products[$i]['id'])"'.
To include the attributes table and the field products_options_values_name.
2) In checkout_process.php you will need to amend:.
$stock_left = $stock_values['products_quantity'] - $order->products[$i]['qty'];.
To have quantity * by products_options_values_name.
Let me know how you get on...
Thank you yesudo for the help.
I think I'm able to see the logic behind your approach and it seems to be something that should work for me.
But with my basic very basic skills in php I'm not able to figure out how I should amend the codes you're talking about..
Would it be too much if I ask for your help on that so that I learn how this is done?.
Thank you again for your assistance..
Let's say your approach works to deduct the amount of CD's removed from my stock, I'm wondering how my cart will check if the quantity I'm ordering is available, as the way I see it now is that once I checkout, the total amount will be deducted without having checked at a previous stage if quantity is available in stock.
I'm really looking forward for some help here, thanks a lot in advance..
This post has been edited by.
: 15 March 2004, 11:06..
The check done on stock would need to have the above calculation done also with a call to the field products_options_values_name via a db query..
Send me your checkout_process.php file so that I can check out how the first bit can be implemented..
: 15 March 2004, 20:42..
Yesudo thank you for the help, I just found the module "price-break-1.11" and this solved my problem.
Maybe I should have looked better first..
How do I add a variable called "lot" in product_info.php that should have the selected value of 'products_options_values_name'?.
As I'm still trying to solve my problem in thread.
I think that this might be the answer to it.
Thank you for the help..
When you put a product in your db e.g. 500 blah blah blah do you note in the db that there are 500 or is that just put in the product name ? .
I.e. have you added another field within the product table to say that there are 500 within the lot ? .
This post has been edited by.
: 13 March 2004, 11:58..