Jump to content

[Solved] How do you disable products' status (new, used, refurbished) in Prestashop 1.4?


fcmdiana

Recommended Posts

Hi

I was wondering if anyone knew the solution to this. I am using Prestashop 1.4 and loving the new features especially the filter color attribute. However is there a way to disable the products’ status (new, used, refurbished) appearing on the filter categories as shown in the image?

 

I have tried going to adminproducts.php and removing the Conditions sections and also the blocklayered.php (from the layerednavigation module but this caused the whole website to not work at all.

 

Please could anyone give me some idea on how to achieve this? I would be so grateful!

 

Thank you in advance ~

p.s also using Matrice theme if that helps

43328_UsmqaKQDRa8Iv63FCB2S_t

Link to comment
Share on other sites

  • 4 weeks later...

I have the same problem and inside the configuration of blocklayered they don't have the option you talking about.

I have
"10 upcoming improvements
Real-time refresh of the cache table
Additional filters (prices, weight)
Ability to manage filters by category in the module configuration
Ability to hide filter groups with no values and filter values with 0 products
Statistics and analysis
Manage products sort & pagination
Add a check on the category_group table
SEO links & real time URL building (ability to give the URL to someone)
Add more options in the module configuration
Performances improvements"

It's just a list of upcoming improvements then in the blocklayered.tpl they don't have "Condition"
I can tell like inside blocklayered.php we can change something but don't know exactly the correct line to remove

Link to comment
Share on other sites

  • 4 weeks later...

On modules\blocklayered\blocklayered.php at line 542 comment (/*

 */)  the following code:
[code]/*            elseif ($filterBlock['type_lite'] == 'condition')
           {
               $filterBlock['name'] = $this->l('Condition');
               $filterBlock['values'] = array(
               'new' => array('name' => $this->l('New'), 'nbr' => 0), 
               'used' => array('name' => $this->l('Used'), 'nbr' => 0), 
               'refurbished' => array('name' => $this->l('Refurbished'), 'nbr' => 0));

               $productCond = $this->filterProducts($products, $selectedFilters, 'condition');

               foreach ($filterBlock['values'] AS $conditionKey => &$condition)
               {
                   foreach ($productCond AS $product)
                       if ($product['condition'] == $conditionKey)
                           $condition['nbr']++;
                   if (isset($selectedFilters['condition']) AND in_array($conditionKey, $selectedFilters['condition']))
                       $condition['checked'] = true;
               }
           }

           elseif ($filterBlock['type_lite'] == 'quantity')
           {
               $filterBlock['name'] = $this->l('Availability');
               $filterBlock['values'] = array(
               '1' => array('name' => $this->l('In stock'), 'nbr' => 0),
               '0' => array('name' => $this->l('Not available'), 'nbr' => 0));                

               $productQuant = $this->filterProducts($products, $selectedFilters, 'quantity');

               foreach ($filterBlock['values'] AS $quantKey => &$quantity)
               {
                   foreach ($productQuant AS $product)
                       if ($product['quantity'] == $quantKey)
                           $quantity['nbr']++;
                   if (isset($selectedFilters['quantity']) AND in_array($quantKey, $selectedFilters['quantity']))
                       $quantity['checked'] = true;
               }
           }
*/            

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
  • 6 months later...

e-technik.ro in my blocklayered.php I cant see the code you are referring to. Am I looking in the wrong place? Im pretty sure I'm in the correct file.

 

 

Thanks.

 

PrestaShop 1.4.6.2

@version Release: $Revision: 10125 $

 

File: modules/blocklayered/blocklayered.php

Line 2255 add /* and line 2272 add */

 

/*
case 'condition':
 $conditionArray = array('new' => array('name' => $this->l('New'), 'nbr' => 0),
 'used' => array('name' => $this->l('Used'), 'nbr' => 0), 'refurbished' => array('name' => $this->l('Refurbished'), 'nbr' => 0));
 if (isset($products) && $products)
  foreach ($products as $product)
   if (isset($selectedFilters['condition']) && in_array($product['condition'], $selectedFilters['condition']))
	$conditionArray[$product['condition']]['checked'] = true;
 foreach ($conditionArray as $key => $condition)
  if (isset($selectedFilters['condition']) && in_array($key, $selectedFilters['condition']))
   $conditionArray[$key]['checked'] = true;
 if (isset($products) && $products)
  foreach ($products as $product)
   if (isset($conditionArray[$product['condition']]))
	$conditionArray[$product['condition']]['nbr']++;
  $filterBlocks[] = array('type_lite' => 'condition', 'type' => 'condition', 'id_key' => 0, 'name' => $this->l('Condition'), 'values' => $conditionArray);
 break;
*/

 

greets

  • Like 1
Link to comment
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
×
×
  • Create New...