Jump to content

Benach

Members
  • Posts

    1
  • Joined

  • Last visited

Profile Information

  • Location
    Lyon
  • Activity
    Web development agency

Benach's Achievements

Newbie

Newbie (1/14)

  • Week One Done Rare
  • One Month Later Rare
  • One Year In Rare

Recent Badges

0

Reputation

  1. Hello everyone, I apologize in advance for my English translated by Google translate ... Context : Some products in my catalog are only available for professionals or for individuals or for everyone, but this condition must do when displaying products in a category (which can be seen by everyone or not). That is why the solution to hide a category custom group can not work in my case. In order to implement this solution I created a custom field in the product table "group_customer" and runs it through an override product.php the class and the view in the admin. On this side everything works perfectly, and can handle some necessary conditions produc.tpl. But not being developer I'm stuck with regard to product display (product-list.tpl) custom group in the desired category. I do not know if I should intervene at the SQL query getProduct or from the controller via parameters in my condition custom group and value in the product. I would really like to understand how to proceed in order to mount competence in that area. To sum up : > custom field "group_customer" in detail product as a possible value: 'all', 'private', 'professional'; > customer group: Visitor (1) - Guest (2) - Private (3) - Business (4); My conditions when displaying: $ GroupCustomerLogin == FrontController::getCurrentCustomerGroups(); if ($ groupCustomerLogin == 1,2,3) { $ GroupCustomerProduct == 'all', 'private'; } Elseif ($ groupCustomerLogin == 4) { $ GroupCustomerProduct == 'all', 'professional' } Can pass in the result to see that the products concerned ... your help is welcome :-) Thank you in advance for your generous support. Best regards.
×
×
  • Create New...