Advertisement

[ flying basket ] different type of product ?

Moderators: Calcifer, slothy

[ flying basket ] different type of product ?

Postby CoolDude » Thu Jul 05, 2007 1:58 pm

hi folks,

If I want to use this script with one type of product, it works fine.
I've added some code in order to keep the basket recorded in a DB.
My problem is :
- I have a table with items (ie: tbl_items -> IDs from 1 to 140), that's the one I'm actually playing with
- I have another table with some other items (ie: tbl_products -> IDs from 1 to 370)
2 tables are needed because products are very differents and do need different type of rows.

So, if I want to add a item from tbl_items, it'll be recorded as "#1" or "#54" and so on... How do I get to had an item from tbl_products in the basket if the ID is the same ?

I've thought about writing some additionnal parts for fly-to-basket.js but can't fix these problems (don't even know if I have a piece of a solution or if my approach is correct :D ) :

- how do I tell the script that ID is related to one particular table ?
-> onclick="addToBasket(ID);return false;" ???

- function showAjaxBasketContent(ajaxIndex)
{
....

a.onclick = function(){ removeProductFromBasket(productItems[0]); };

// here is the same problem -> how do I tell the script that productItems[0] is related to one particular table ?
}

well, dunno if I'm crystal clear, but if one of you has a hint ;)
thanks a lot !
CoolDude
 
Posts: 2
Joined: Tue Jul 03, 2007 11:29 am

Postby CoolDude » Fri Jul 13, 2007 10:14 am

I've solved many of the previous problems :)
Anyhow, event though it's working properly, I still have a bug that's bothering me...
When I add an item from table #1 or a item from table #2 (or removing), it's ok but for a warning : "ajaxObjects[...].response has NULL value or is not an object".
And this time, no way I find the way out by myself :)
thx for the help folks
CoolDude
 
Posts: 2
Joined: Tue Jul 03, 2007 11:29 am


Return to General questions regarding AJAX scripts

Who is online

Users browsing this forum: No registered users and 16 guests

cron