Contributions
Custom Products 1.0
This contribution displays a custom product category based on the user login. The logged in user sees their products as well as normal ones, and nobody else's custom products. If the user is not logged in, the category is not displayed at all.
It should be noted that this contribution was originally made to display custom photos for a photographer's site. You'll see a file named myphotos.php which I just don't have time to stop and change to something generic. You should change it to whatever you want -- see the notes for more details.
Expand All / Collapse All
there's a bug in previous version: the custom products' category is shown on the Log Off page. It is hidden on refresh
This bug is now fixed. In the includes/boxes/categories.php file
//find
if (strlen(trim($customer_id.""))==0
//add after
|| !tep_session_is_registered('customer_id')
With PHP5 and MySQL5 the version 1.01 caused the following error:
1054 - Unknown column 'p.products_id' in 'on clause'
select count(p.products_id) as total from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join specials s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '2' and (p.customers_id='2' or p.customers_id=0 or p.customers_id='') and p2c.categories_id = '21'
I've changes the files index.php and advanced_search_results.php – now it works fine :-)
Custom Products 1.01 for osCommerce v2.2-MS2
(categories.php from the original Custom Products v 1.0 contained some unnecessary JATECH option stuff)
new files:
whats_new.php
This contribution displays a custom product category based on the user login. The logged in user sees their products as well as normal ones, and nobody else's custom products. If the user is not logged in, the category is not displayed at all.
It should be noted that this contribution was originally made to display custom photos for a photographer's site. You'll see a file named myphotos.php which I just don't have time to stop and change to something generic. You should change it to whatever you want -- see the notes for more details.
Note: Contributions are used at own risk.