Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

HELP!!


Guest

Recommended Posts

Posted

HELP!! :(

 

My php skills are poor at the best of times. I can usually read code and figure out basic stuff to do, but this time I'm stuck.

 

I want to be able to send information via a url to a generic product and have that information recorded on their order against that product.

 

I want to use this so my customers can book a course online. When they click on a link it sends them to the generic product in the shop and identifies the date of the course from the hyperlink. Obviously this hyperlink link can't have a osCsid speficied.

 

I have modified my product_info.php file to extract the course information by adding these lines to the start of the file and them simply using an echo statement on the page.

 

if ($HTTP_GET_VARS['cinfo'] != "") {

$info = "Selected Date: {$HTTP_GET_VARS['cinfo']}" ; }

else {

$info = " ";}

 

What I now need to do is grab the contents of $HTTP_GET_VARS['cinfo'] when the customer adds the product to their cart, and display it at the other end so I know which course they have booked. Ideally I would record this as an attribute of the product so they can book multiple courses in the one order.

 

Any help anyone can provide would be much appreciated.

Posted

Can anyone explain these lines of code from Product_info.php

 

if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) {

$selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']];

} else {

$selected_attribute = false;

}

 

I think this is where it adds the attributes to the shopping cart, so how can I trick the ['attributes'] into equalling my variable $info???

 

If anyone can please help that would be fantastic.

 

regards

 

Craig

Posted

Can anyone at least tell me if I am looking in the right place??

 

Pretty please with sugar on top??

 

I just need to understand how items are added to the cart, then I'm sure I'll figure out the rest...

 

:'(

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...