Irish SEO,  Marketing & Webmaster Discussion
 

 

Go Back   Irish SEO, Marketing & Webmaster Discussion > Webmaster Help > Coding Help


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 23-02-2006, 03:51 PM
louie's Avatar
Senior Member
 
Join Date: Jan 2006
Location: Dublin, Ireland
Posts: 1,923
louie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud of
Send a message via Yahoo to louie Send a message via Skype™ to louie
Default help with this

trying to compare 2 arrays and based on that increment the qty in the shopping cart or add a new product.

the first one is sc_pid which is equal to the productid querystring

the second one is sc_pdid = to productdetailsid if the product has attributes as color, size, etc.

It adds to the cart (based on session array), but i can not get it to incremetn the qty once is already in the cart.
__________________
:. Web Design & Development Web Design Ireland
:. Search Engines Optimization Search Engines Optimization
:. Directory Submission Directory Submission
:. News & Press Release Ireland GiveItSocks.com
:. Used Cars Ireland, Car Parts & Car Audio Cars For Sale, Car Parts & Accessories
:. I Have 2 Find It Directory SEF Directory

Last edited by louie; 24-02-2006 at 07:19 PM.
Reply With Quote
  #2 (permalink)  
Old 23-02-2006, 09:01 PM
Member
 
Join Date: Feb 2006
Location: cloud9
Posts: 47
9barJoe will become famous soon enough
Send a message via MSN to 9barJoe Send a message via Skype™ to 9barJoe
Default

whats this function add_item_to_cart()
__________________
roll on summer
Reply With Quote
  #3 (permalink)  
Old 23-02-2006, 10:02 PM
louie's Avatar
Senior Member
 
Join Date: Jan 2006
Location: Dublin, Ireland
Posts: 1,923
louie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud of
Send a message via Yahoo to louie Send a message via Skype™ to louie
Default

Quote:
Originally Posted by 9barJoe
whats this function add_item_to_cart()
is the function tha actually add the item to the session
__________________
:. Web Design & Development Web Design Ireland
:. Search Engines Optimization Search Engines Optimization
:. Directory Submission Directory Submission
:. News & Press Release Ireland GiveItSocks.com
:. Used Cars Ireland, Car Parts & Car Audio Cars For Sale, Car Parts & Accessories
:. I Have 2 Find It Directory SEF Directory

Last edited by louie; 24-02-2006 at 07:20 PM.
Reply With Quote
  #4 (permalink)  
Old 24-02-2006, 07:21 PM
louie's Avatar
Senior Member
 
Join Date: Jan 2006
Location: Dublin, Ireland
Posts: 1,923
louie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud of
Send a message via Yahoo to louie Send a message via Skype™ to louie
Default

after more then 24 hours of work i managed to do it.
__________________
:. Web Design & Development Web Design Ireland
:. Search Engines Optimization Search Engines Optimization
:. Directory Submission Directory Submission
:. News & Press Release Ireland GiveItSocks.com
:. Used Cars Ireland, Car Parts & Car Audio Cars For Sale, Car Parts & Accessories
:. I Have 2 Find It Directory SEF Directory
Reply With Quote
  #5 (permalink)  
Old 27-02-2006, 09:41 AM
Member
 
Join Date: Feb 2006
Location: cloud9
Posts: 47
9barJoe will become famous soon enough
Send a message via MSN to 9barJoe Send a message via Skype™ to 9barJoe
Default

well, thats what its all about.

sorry pal, I would have liked to have had a look, but you know its murder looking into someone elses head , & pretty well snowed under at the mo' too.

rock on.
__________________
roll on summer
Reply With Quote
  #6 (permalink)  
Old 27-02-2006, 09:46 AM
louie's Avatar
Senior Member
 
Join Date: Jan 2006
Location: Dublin, Ireland
Posts: 1,923
louie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud of
Send a message via Yahoo to louie Send a message via Skype™ to louie
Default

Quote:
Originally Posted by 9barJoe
well, thats what its all about.

sorry pal, I would have liked to have had a look, but you know its murder looking into someone elses head , & pretty well snowed under at the mo' too.

rock on.
If i had to do that in ASP, i could have it done in 30 min, but being new to PHP, it took me 24 hours after reading and more reading and Google, and php forums and lots of cigarettes + coffee, and ....

I managed in the end which is the joy of the job anyway. I love challenge.
__________________
:. Web Design & Development Web Design Ireland
:. Search Engines Optimization Search Engines Optimization
:. Directory Submission Directory Submission
:. News & Press Release Ireland GiveItSocks.com
:. Used Cars Ireland, Car Parts & Car Audio Cars For Sale, Car Parts & Accessories
:. I Have 2 Find It Directory SEF Directory
Reply With Quote
  #7 (permalink)  
Old 27-02-2006, 02:13 PM
Frontpage User
 
Join Date: Jan 2006
Posts: 10
evilhomer will become famous soon enough
Default

So are you going to share the solution with us Louie ??
Reply With Quote
  #8 (permalink)  
Old 27-02-2006, 03:13 PM
louie's Avatar
Senior Member
 
Join Date: Jan 2006
Location: Dublin, Ireland
Posts: 1,923
louie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud of
Send a message via Yahoo to louie Send a message via Skype™ to louie
Default

Quote:
Originally Posted by evilhomer
So are you going to share the solution with us Louie ??
the solution was to create the

function add_item_to_cart($id,$pdid,$quantity) {
$cart_id = $id.$pdid; //this the line that got me mixed up - was looking into the wrong direction
//echo $cart_id;
//die();
// set cookie and store value in session
setstp();
session_regenerate_id(TRUE);
$_SESSION["cart"][$cart_id][0] = $id; //$item["productid"];
$_SESSION["cart"][$cart_id][1] = $quantity;//$quantity
$_SESSION["cart"][$cart_id][2] = $pdid; //$productdetailid
header ("location:viewcart.php");//redirect after product added to cart
//}
}
__________________
:. Web Design & Development Web Design Ireland
:. Search Engines Optimization Search Engines Optimization
:. Directory Submission Directory Submission
:. News & Press Release Ireland GiveItSocks.com
:. Used Cars Ireland, Car Parts & Car Audio Cars For Sale, Car Parts & Accessories
:. I Have 2 Find It Directory SEF Directory
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT +1. The time now is 04:03 AM.


Powered by: vBulletin Version 3.7.2, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.

Search Engine Friendly URLs by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56