Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PLEASE HELP with sessions and categories menu


rofsky

Recommended Posts

Hello, I have a question, I have a oscommerce store I am working on for a customer, and It has sts 4 and a few other contributions, only one related would be sts. Well the issue im having is I customized the store to bring back products for specific vehicles only. see example at www.dealsofsteel.com . well I would like the categories menu to only show the corresponding products to the vehicle, if you look now it shows how many products are in the db. i have a new valid sql statement that will bring the correct info to the menu, but the problem I am having is I can't pass the vehicle variable correctly to the categories.php file. I can pass the variable to any page without problem, ie if you select a vehicle on that first page it reloads the page with the vehicle id in the get variable, and the page below tells you which vehicle you have.

 

Does anyone know is this happening becuase sts grabs the categories.php page prior to the session ??? I have the vehicle related code in applicationtop.php, it is in the bottom of the file. and this seems to work for everything else...

 

 

any suggestions?

 

Thank You very much,

Arthur Nemirovsky

Link to comment
Share on other sites

Hello, I have a question, I have a oscommerce store I am working on for a customer, and It has sts 4 and a few other contributions, only one related would be sts. Well the issue im having is I customized the store to bring back products for specific vehicles only. see example at www.dealsofsteel.com . well I would like the categories menu to only show the corresponding products to the vehicle, if you look now it shows how many products are in the db. i have a new valid sql statement that will bring the correct info to the menu, but the problem I am having is I can't pass the vehicle variable correctly to the categories.php file. I can pass the variable to any page without problem, ie if you select a vehicle on that first page it reloads the page with the vehicle id in the get variable, and the page below tells you which vehicle you have.

 

Does anyone know is this happening becuase sts grabs the categories.php page prior to the session ??? I have the vehicle related code in applicationtop.php, it is in the bottom of the file. and this seems to work for everything else...

any suggestions?

 

Thank You very much,

Arthur Nemirovsky

 

 

Maybe you should try getting through to one of the moderators on this forum, it sounds like what you need is beyond most people's simple setup questions....just a suggestion.

Link to comment
Share on other sites

I suggest you give out way more details ... that's why noone can help you ... I'm trying to anyway, even though without more info or even better code it's hard.

 

I am only assuming here that you want to change the red numbers in the show category count to reflect the subselects done for the relevant products model. As the showing or not showing of that number at all is determined in the categories.php (if you have not changed to a template) in the top part, the function here

function tep_show_category($counter) {

 

if (SHOW_COUNTS == 'true') {

$products_in_category = tep_count_products_in_category($counter);

if ($products_in_category > 0) {

$categories_string .= ' (' . $products_in_category . ')';

}

}

 

where you would add your own info so the function, which you have hopefully rewriten to accept that parameter, can execute and give out the correct number. If you are storing that reference value in a session variable, you need to declare it in the function. Like I said, no info, not much useful help.

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...