Jump to content

Roman168140

Members
  • Posts

    3
  • Joined

  • Last visited

Profile Information

  • Activity
    Developer

Roman168140's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi. I have this issue. I need to filter products that should be displayed. And i have to do it on controller or class level because i use many modules ex. layered navigation filters so i thought that its better to filter them in one place rather than in many so i have to modify condition at source. Ex. I want display (everywhere) produts that have EAN field filled. If there is no ean product should not be displayed Same thing for ex. is for photo. If there is no photo product should not be displayed. I was wondering if presta have this mechanism implemented ( fetching product in one place) or there is another solution Need suggestions. Regards RS
  2. Ok. I managed to achieve what i want. Table ps_product_shop also required to add related in visibility enum field.
  3. Hey.I want do add another option to product visibility (in product informations) because i have products that may appears in special places only. I made changes at informations.tpl where i add <option value="related" {if $product->visibility == 'related'}selected="selected"{/if} >{l s='Related only'}</option> In Validation file isProductVisibility: return preg_match('/^both|catalog|search|related|none$/i', $s); and in /classes/Product.php 'visibility' => array('type' => self::TYPE_STRING, 'shop' => true, 'validate' => 'isProductVisibility', 'values' => array('both', 'catalog', 'search','related', 'none'), 'default' => 'both'), and changed in DB ps_product Enum field 'visibility' that it accept 'related' Saving works fine. In db it shows "related". But in AdminContrroller (BackOffice, front i can handle) on this product page( in informations tab ) there is no correct population because product->visibility ='' Why!?. Thanks in advance.
×
×
  • Create New...