Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Quick session question?


Guest

Recommended Posts

This may not be the correct forum, but here goes.

 

I am implementing the customer discount mod and wanting to alter it just a tad.

 

I went into login.php and modified the mysql search that retrieves customer information to include the customer_discount field for the logged in customer as such

 

$check_customer_query = tep_db_query("select customers_id, customers_firstname, customers_password, customers_email_address, customers_default_address_id, customer_discount from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");

 

a few lines down I added

$customer_discount = $check_country['customer_discount'];

tep_session_register('customer_discount');

which I would expect would get the discount and save it as a session variable.

 

When I echo any of the other variables saved this way on other pages they show up. When I echo this one it is blank. Any ideas?

Link to comment
Share on other sites

  • 1 year later...

is customer_discount a complex an array or object? i had some problems once in PHP 4.3 where unless i explicitly serialized an object before registering, it would get lost.

 

not sure this will help.

FlashMOG - make multiplayer games in Flash/PHP!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...