Jump to content
Sign in to follow this  
alex_rus

Hide products from groups for B2BSuite

Recommended Posts

Hide Product contribution can be taken here

 

Post your questions and improvement here.

I post it as contribution as may be more experience in PHP than I can help to solve the issues.

 

If you have the existing shop with settled goods and want just to hide them from some customers on constant basis (and not make visible/invisible every day :rolleyes: ) you can use it without problems.

 

Alexander

Edited by alex_rus

Share this post


Link to post
Share on other sites
Hide Product contribution can be taken here

 

Post your questions and improvement here.

I post it as contribution as may be more experience in PHP than I can help to solve the issues.

 

If you have the existing shop with settled goods and want just to hide them from some customers on constant basis (and not make visible/invisible every day :rolleyes: ) you can use it without problems.

 

Alexander

 

Have you fixed the issue of it crashing when you add a product?

 

thanks

Share this post


Link to post
Share on other sites
Have you fixed the issue of it crashing when you add a product?

 

thanks

 

I'm looking to implement something like this to setup permissions for users to only see products avaliable to them.

 

Has anyone used this contrib to do this? They ofcourse need to add new products to the given group for the user to see.

Share this post


Link to post
Share on other sites
If you have the existing shop with settled goods and want just to hide them from some customers on constant basis (and not make visible/invisible every day :rolleyes: ) you can use it without problems.

 

Can this be used for showing some products to only certain users? I have a store with a lits of 'preferred' users that I would like to offer special products to. Instead of adding everyone else to a "hide" list, I would like to add only them to a "show" list.

Share this post


Link to post
Share on other sites

To solve the bug when you create a product . open categorie and change .

 

 

<?php  // ############# Added Hide product from groups B2B suite ############### ?>
       <tr align="top">
        <td>
         <? echo TEXT_HIDE_PRODUCTS_FROM_GROUP; ?></td>
    <td class="dataTableContent">
       <table border="0" cellpadding="0" cellspacing="0">
<?php
       // Check which groups should be hidden - Problem RESOLVED BELOW (int)$HTTP_GET_VARS['pID']




       $product_hide_from_group_query = tep_db_query("select products_hide_from_groups from ".TABLE_PRODUCTS." where products_id =". (int)$HTTP_GET_VARS['pID'] );






       $hide_these_products = tep_db_fetch_array
($product_hide_from_group_query);
    $hide = explode(',',$hide_these_products['products_hide_from_groups']);
       $customers_group_query = tep_db_query("select distinct customers_group_id, customers_group_name from " . TABLE_CUSTOMERS_GROUPS . " where customers_group_id != '" . 0 . "' order by customers_group_id");
       $i=1;
       while ($customers_group = tep_db_fetch_array($customers_group_query)) {
   foreach($hide as $h){
    if($h == $customers_group['customers_group_id']){
     $check_hidden = true;
      break;
    }else{
      $check_hidden = false;
    }
   }
#print the checkbox field
   echo  '<tr class="dataTableContent"><td>'.
      ($i).'. '. tep_draw_checkbox_field('hide[' . ($i++) . ']',
    $customers_group['customers_group_id'] ,
    $check_hidden) . ' ' . $customers_group['customers_group_name'].'</td></tr>';
     }#End of while
       ?>
       </table>
      </td>
     </tr>
<?php  // ############# Hide product from groups B2B suite ############### ?>

 

When you use B2Bsuite , you can not delete a product for the client not logged. Is it possible to insert this option.

 

This contribution is very interesting but it works only with the dynamic group. It's interesting to develop for the static group in b2bsuite (client).

 

Do you have an idea ?

Edited by Gyakutsuki


Regards
-----------------------------------------
Loïc

Contact me by skype for business
Contact me @gyakutsuki for an answer on the forum

 

Share this post


Link to post
Share on other sites

I have integrated Hide products from customer groups for SPPC into the cart with great success.. I also am working with Easy Populate which is a life saver!! Is there someway to get the hide column into the Easy Populate?? There are just over 3000 items in the cart and 40-60% will need to be hidden from the retail people.

 

I see the "products_hide_from_groups" data is in the products table in the DB.. I see the non-hidden products are marked "@" in the field.. I also see the hidden products are marked "@,0"

 

I do not need to hide products at all from the other groups.. just the retail..

 

So how can I add this to the Easy Populate so these particular times do not have to be hidden one by one individually, but rather do it en mass with Easy Populate..

 

I suppose I can ezpopulate then export the product table, alter it locally, empty the table, then import the altered?? That would work also but it would be extra work rather than having this done within Easy Populate inthe first place!

 

thanks!


Debbie D
Franklin County, VA "Moonshine Capitol of the World"
osCmax Mobile Template oscmaxtemplates.com

Share this post


Link to post
Share on other sites

I have fooled with this from several different angels now and just can not get Easy Populate to update the Hide column.. can anyone help please?? I am in a time crunch now...

Edited by wkdwich

Debbie D
Franklin County, VA "Moonshine Capitol of the World"
osCmax Mobile Template oscmaxtemplates.com

Share this post


Link to post
Share on other sites

I'm getting this error and don't know why, it works great!! otherwise but,

 

when I try to create a new product I get this

 

1064 - You have an error in your SQL syntax near '' at line 1

 

select products_hide_from_groups from products where products_id =

 

Is there any way you know of to fix this?

 

Thank you for any help or direction with this

 

 

 

 

Support thread for Hide Product contribution.

 

Post your questions and improvement here.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×