Jump to content



Latest News: (loading..)

* * * * * 3 votes

Simply Hide Products (SHP)


  • Please log in to reply
85 replies to this topic

#41   fernyburn

fernyburn
  • Members
  • 139 posts
  • Real Name:Ronnie

Posted 15 April 2010 - 09:23 AM

My Hero !!

yes it does - thankyou so much....

This is perfect for me as I can now lose  our trade site, as we have different prices for them, and yet more different prices for overseas trade, and I can make certain customers only see certain prices

Fab - Thanks Again !

#42   Pronux

Pronux
  • Members
  • 98 posts
  • Real Name:Pronux
  • Gender:Male
  • Location:Switzerland

Posted 15 April 2010 - 01:21 PM

ok, cool :-)
Specialist in end-to-end integration between osCommerce and Microsoft Dynamics NAV ERP System
About Pronux | Pronux Contributions and Add-Ons

#43   fernyburn

fernyburn
  • Members
  • 139 posts
  • Real Name:Ronnie

Posted 28 April 2010 - 08:22 AM

Hi
Im using this contribution for wholesale/trade dropshipping.

Ive noticed that the entries of whom is allowed to see certain products / categories is pulkled from the address book.

This means that when I send somthing I need to change the shipping address, therefore the list of customers in the categories shows the drop ship customers name instead of the company that will be billed for it.

How can I update the information to show billing address not address book address

Thanks
Ron

#44   fernyburn

fernyburn
  • Members
  • 139 posts
  • Real Name:Ronnie

Posted 28 April 2010 - 08:56 AM

Ive found the places

Quote

$query = tep_db_query("SELECT c.customers_id, a.entry_company, a.entry_firstname, a.entry_lastname, a.entry_city FROM ".TABLE_CUSTOMERS." c, ".address_book." a WHERE c.customers_default_address_id = a.address_book_id ORDER BY entry_company, entry_lastname");


Quote

$query = tep_db_query("SELECT hp.hidden_products_id, c.customers_id, a.entry_company, a.entry_firstname, a.entry_lastname, a.entry_city FROM ".TABLE_CUSTOMERS." c, ".address_book." a, hidden_products hp WHERE hp.customers_id = c.customers_id AND c.customers_default_address_id = a.address_book_id AND ".$query_id." ORDER BY entry_company, entry_lastname");

Do i simply change TABLE_CUSTOMERS  & address_book to orders  and billing_company   ?

#45   goodolandy

goodolandy
  • Members
  • 25 posts
  • Real Name:Andrew

Posted 29 April 2010 - 07:59 PM

Hello Pronux,

I first want to say that I think your script is a great add-on for anyone doing e-commerce and should be an already built in feature.  I have not yet fully tested it but so far it is looking great.

I just wanted to pass along a feature that would be nice to have incorporated in to SHP, the allowing of using customer names OR customer groups.  I also have the add-on "Separate Price Per Customer" installed which allows the creation of user groups so it would be nice to choose groups instead of each individual user.

I would even be willing to try and incorporate it myself but I am not a PHP expert so I am not exactly sure which code and in which file I would need to edit.

Anyways, keep up the great work.

Andy

#46   Pronux

Pronux
  • Members
  • 98 posts
  • Real Name:Pronux
  • Gender:Male
  • Location:Switzerland

Posted 03 May 2010 - 11:58 PM

@fernyburn:

Quote

Do i simply change TABLE_CUSTOMERS & address_book to orders and billing_company ?
You've found the right places, but I don't think that this would work. SHP needs the customer_id and from the customer record from (table customers) you can only find the customers_default_address_id in table address_book. If you are very clever, you can go to table orders and lookup the relevant billing_address_format_id. You have to try it.


@goodolandy: Thanks for your feedback. You are not the first person who suggests the feature you mentioned (customer groups in combination with SSPC). Unfortunately it's not an easy thing to do. If osCommerce 3.0 will not have built-in this feature, we will develop it. For osCommerce 2.x we think it's too late.

Edited by Pronux, 04 May 2010 - 12:02 AM.

Specialist in end-to-end integration between osCommerce and Microsoft Dynamics NAV ERP System
About Pronux | Pronux Contributions and Add-Ons

#47   bouliniatko

bouliniatko
  • Members
  • 5 posts
  • Real Name:Mark
  • Gender:Male
  • Location:Slovakia

Posted 02 June 2010 - 03:03 PM

Hi Pronux,
your contribution is great, but I have a little problem.
My shop has about 80.000 products. Some category has 500 products, some 20.000 products, ... . If I hide category with 20.000 products, contribution doesn't work. Can you help me?

#48   Pronux

Pronux
  • Members
  • 98 posts
  • Real Name:Pronux
  • Gender:Male
  • Location:Switzerland

Posted 02 June 2010 - 03:08 PM

but does it work when you hide a small category?
Specialist in end-to-end integration between osCommerce and Microsoft Dynamics NAV ERP System
About Pronux | Pronux Contributions and Add-Ons

#49   bouliniatko

bouliniatko
  • Members
  • 5 posts
  • Real Name:Mark
  • Gender:Male
  • Location:Slovakia

Posted 02 June 2010 - 08:10 PM

View PostPronux, on 02 June 2010 - 03:08 PM, said:

but does it work when you hide a small category?
Yes, it's work. Problem is with large category only. I think that $_SESSION['hidden_products'] is to large. Variable $hidden_products has about 300.000 chars. What do you think about it?

Edited by bouliniatko, 02 June 2010 - 08:17 PM.


#50   Pronux

Pronux
  • Members
  • 98 posts
  • Real Name:Pronux
  • Gender:Male
  • Location:Switzerland

Posted 02 June 2010 - 09:13 PM

View Postbouliniatko, on 02 June 2010 - 08:10 PM, said:

I think that $_SESSION['hidden_products'] is to large. Variable $hidden_products has about 300.000 chars. What do you think about it?

I think you are right. SHP stores all hidden articles in $_SESSION['hidden_products']. If you are hiding hundreds of articles it becomes to large for the session variable. Sorry, but I don't see a solution for this problem right now.
Specialist in end-to-end integration between osCommerce and Microsoft Dynamics NAV ERP System
About Pronux | Pronux Contributions and Add-Ons

#51   bouliniatko

bouliniatko
  • Members
  • 5 posts
  • Real Name:Mark
  • Gender:Male
  • Location:Slovakia

Posted 03 June 2010 - 05:57 AM

View PostPronux, on 02 June 2010 - 09:13 PM, said:

I think you are right. SHP stores all hidden articles in $_SESSION['hidden_products']. If you are hiding hundreds of articles it becomes to large for the session variable. Sorry, but I don't see a solution for this problem right now.
Thank you for your quick answer. I think, if I devide $_SESSION['hidden_products'] to more sessions (e.g. $_SESSION['hidden_products_1'], $_SESSION['hidden_products_2'], ...) it would be work correctly.

What do you think?

#52   Pronux

Pronux
  • Members
  • 98 posts
  • Real Name:Pronux
  • Gender:Male
  • Location:Switzerland

Posted 03 June 2010 - 09:05 PM

View Postbouliniatko, on 03 June 2010 - 05:57 AM, said:

Thank you for your quick answer. I think, if I devide $_SESSION['hidden_products'] to more sessions (e.g. $_SESSION['hidden_products_1'], $_SESSION['hidden_products_2'], ...) it would be work correctly.

What do you think?

It could work, but since SHP alters all categories/products related SQL queries (see /includes/functions/database.php) I don't recommend it, because it could make the SQL-queries in your shop too big. I recommend you to use another contribution which is better for your shop.
Specialist in end-to-end integration between osCommerce and Microsoft Dynamics NAV ERP System
About Pronux | Pronux Contributions and Add-Ons

#53   bouliniatko

bouliniatko
  • Members
  • 5 posts
  • Real Name:Mark
  • Gender:Male
  • Location:Slovakia

Posted 04 June 2010 - 06:25 AM

View PostPronux, on 03 June 2010 - 09:05 PM, said:

It could work, but since SHP alters all categories/products related SQL queries (see /includes/functions/database.php) I don't recommend it, because it could make the SQL-queries in your shop too big. I recommend you to use another contribution which is better for your shop.
Thank you, Pronux.
Can you recommend me any contribution for my shop?

#54   Pronux

Pronux
  • Members
  • 98 posts
  • Real Name:Pronux
  • Gender:Male
  • Location:Switzerland

Posted 04 June 2010 - 01:44 PM

Maybe one of this two:
http://addons.oscommerce.com/info/5907
http://addons.oscommerce.com/info/2597
I think you have to test them.
Specialist in end-to-end integration between osCommerce and Microsoft Dynamics NAV ERP System
About Pronux | Pronux Contributions and Add-Ons

#55   bouliniatko

bouliniatko
  • Members
  • 5 posts
  • Real Name:Mark
  • Gender:Male
  • Location:Slovakia

Posted 07 June 2010 - 05:36 AM

Thank you for your help. I try use one of these contributions.

#56   skylarkBlue

skylarkBlue
  • Members
  • 6 posts
  • Real Name:skylark jones

Posted 08 August 2010 - 06:08 PM

View PostPronux, on 29 December 2009 - 07:55 PM, said:

Hi,

This seems to be a bug which occurs only if you hide categories but no products. Please try the following fix:

Open file catalog/includes/functions/general.php, go to function tep_set_hidden_products and add near line 1400 the code:

else
{
   $has_hidden_categories = true;			
}

before:

//find hidden categories and also all products in there	
if($has_hidden_categories)
{
after it should look like:

else
{
   $has_hidden_categories = true;			
}
			
//find hidden categories and also all products in there	
if($has_hidden_categories)
{
Does this fix your problem ?


#57   skylarkBlue

skylarkBlue
  • Members
  • 6 posts
  • Real Name:skylark jones

Posted 08 August 2010 - 06:09 PM

Hi, I love this add-on. I am using several others, so I have manually added this to my code. I read about this line of code solving and issue in general.php (catalog)

else
{
$has_hidden_categories = true;
}

//find hidden categories and also all products in there

when I use the above code my customer can only see the first category and none of the subcategories.
If I don't use it they can see all catetories.

I would greatly appreciate you help with this.


Skylark

0

#58   Pronux

Pronux
  • Members
  • 98 posts
  • Real Name:Pronux
  • Gender:Male
  • Location:Switzerland

Posted 24 August 2010 - 02:58 PM

Thanks for the info. I will have a look at it in the next days and give you an update.
Specialist in end-to-end integration between osCommerce and Microsoft Dynamics NAV ERP System
About Pronux | Pronux Contributions and Add-Ons

#59   BertaRecchia

BertaRecchia
  • Members
  • 71 posts
  • Real Name:Faux Stone Panels
  • Gender:Female

Posted 04 October 2010 - 04:20 PM

Do you guys know if there's anyone interested in installing this contribution ( SPH ) to my ecommerce?

Thank you.

#60   xp02ed

xp02ed
  • Members
  • 52 posts
  • Real Name:Jay
  • Gender:Male

Posted 16 November 2010 - 05:06 AM

awesome contrib!

i had several contrib installed which it had a conflict and post prior diagnosed it was with the string replace of "where" in /catalog/includes/functions/database.php

to fix it i went through several contributes and ensured that "where" on the query was on the same line as the whole query.

example//

        $eg_query = tep_db_query("select distinct p.fr_currencies_id, p.products_id, p.products_image, pd.products_name, p.products_tax_class_id, products_price, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, specials_new_products_price
        from " . TABLE_PRODUCTS_XSELL . " xp left join " . TABLE_PRODUCTS . " p on xp.xsell_id = p.products_id
        left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "'
        left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id
        where xp.products_id = '" . $HTTP_GET_VARS['products_id'] . "'
        and p.products_status = '1'
        order by sort_order asc limit " . MAX_DISPLAY_XSELL);

had to be changed to

        $eg_query = tep_db_query("select distinct p.fr_currencies_id, p.products_id, p.products_image, pd.products_name, p.products_tax_class_id, products_price, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, specials_new_products_price
        from " . TABLE_PRODUCTS_XSELL . " xp left join " . TABLE_PRODUCTS . " p on xp.xsell_id = p.products_id
        left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "'
        left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where xp.products_id = '" . $HTTP_GET_VARS['products_id'] . "'
        and p.products_status = '1'
        order by sort_order asc limit " . MAX_DISPLAY_XSELL);


MOVED the where up a line.

i hope this helps people as i spent 2 hours figuring it out! not a pro coder :(