Jump to content

How to change the order of the entries of Features?


Recommended Posts

1. Currently the features displayed in the "Data Sheet" are alphabetically listed.

Could we change their order manually?

 

2. I wish to have one feature in bode fonts.

 

3. It would be clearer if we could have two columns in the "Data sheet". The first column is the name of the feature, and the second column is its value. Currently the values of different features are not aligned in one column.

 

Let's compare the "Data sheet" tab in the prestashop demo here:

http://demo-store.prestashop.com/en/electronics/31-android-phone.html

 

vs the "Detais" tab on NewEgg:

http://www.newegg.com/Product/Product.aspx?SID=0ObyHngxEeGA3s66uOKJ7Q0&AID=10440897&PID=1225267&nm_mc=AFC-C8Junction&cm_mmc=AFC-C8Junction-_-cables-_-na-_-na&Item=N82E16875101038

In addition, could we split the current feature list into "General Features" and "Technical Features" in the Data Sheet?

 

 

Sorry for so many questions, and Thanks for all of your efforts.

Link to comment
Share on other sites

1. Currently the features displayed in the "Data Sheet" are alphabetically listed.

Could we change their order manually?

 

> you'd have to change some stuff ... the

create your own function Product::getFrontFeaturesStatic()

change the call in the ProductController

Link to comment
Share on other sites

> Change position of the products in the home category

 

Sorry daYmo, could you clarify it in more details?

 

I want to change the order of the feature list of ONE product, such as

1. Hight

2. Width

3. Weight

...

Link to comment
Share on other sites

  • 2 months later...

I ended up doing something similar, but modified the php files instead. I think its a cleaner hack.

 

my features are now in this format in the admin panel

01**Width

02**Height

03**Depth

 

How to Install

1. look for {prestashop installation}/override/controllers

2. take the attached ProductController.php and copy it into that location

 

NOTE: we assume that you are using the standard installation of prestashop and have not made any other modifications to the ProductController.php

 

Changes

1. Modified the class signature to be:

class ProductController extends ProductControllerCore

2. removed all the other functions other than:

public function process()

3. added the following code:

/* Features / Values */
$features = $this->product->getFrontFeatures((int)self::$cookie->id_lang);

//check to see if features are empty
if($features!=null || !empty($features))
{
 //sort the features
 sort($features);

 //create a new array to store the new data into
 $sFeatures = array();

 //go through all the features
 foreach($features as $f)
 {
  //grab the name
  $str = $f['name'];
  //split the name on **
  $arr = preg_split("/\\*\\*/", $str);

  //if it meets these conditions then lets store it
  if(count($arr) == 2){
   $f['name'] = $arr[1];
  }

  //store into new features
  $sFeatures[] = $f;
 }

 //replace the new features back into old features
 $features = $sFeatures;
}

 

Edit: I was referring to this post

http://www.prestashop.com/forums/topic/9709-edit-features-order-list/

ProductController.php

Edited by macgngsta (see edit history)
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...