Jump to content

michaeld

Members
  • Posts

    2
  • Joined

  • Last visited

michaeld's Achievements

Newbie

Newbie (1/14)

6

Reputation

  1. why not leave in the sub? just edit your .htaccess file in the root dir and put this in it: (you need to replace prestashop by your own subdir and mysite.com by your own domainname obviously) # Copy and paste the following code into the .htaccess file # in the public_html folder of your hosting account # make the changes to the file according to the instructions. # Do not change this line - RewriteEngine on RewriteEngine on # Change yourdomain.com to be your main domain. RewriteCond %{HTTP_HOST} ^(www.)?mysite.com$ # Change 'subfolder' to be the folder you will use for your main domain. RewriteCond %{REQUEST_URI} !^/prestashop/ # Don't change this line. RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # Change 'subfolder' to be the folder you will use for your main domain. RewriteRule ^(.*)$ /prestashop/$1 # Change yourdomain.com to be your main domain again. # Change 'subfolder' to be the folder you will use for your main domain # followed by / then the main file for your site, index.php, index.html, etc. RewriteCond %{HTTP_HOST} ^(www.)?mysite.com$ RewriteRule ^(/)?$ prestashop/index.php [L]
  2. This is a quick hack to organize your features(in de same way you organize your categories): Edit file classes/Product.php Replace: /* * Select all features for a given language * * @param $id_lang Language id * @return array Array with feature's data */ static public function getFrontFeaturesStatic($id_lang, $id_product) { return Db::getInstance()->ExecuteS(' SELECT name, value, pf.id_feature FROM '._DB_PREFIX_.'feature_product pf LEFT JOIN '._DB_PREFIX_.'feature_lang fl ON (fl.id_feature = pf.id_feature AND fl.id_lang = '.intval($id_lang).') LEFT JOIN '._DB_PREFIX_.'feature_value_lang fvl ON (fvl.id_feature_value = pf.id_feature_value AND fvl.id_lang = '.intval($id_lang).') WHERE pf.id_product = '.intval($id_product)); } With: /* * Select all features for a given language * * @param $id_lang Language id * @return array Array with feature's data */ static public function getFrontFeaturesStatic($id_lang, $id_product) { $result = Db::getInstance()->ExecuteS(' SELECT name, value, pf.id_feature FROM '._DB_PREFIX_.'feature_product pf LEFT JOIN '._DB_PREFIX_.'feature_lang fl ON (fl.id_feature = pf.id_feature AND fl.id_lang = '.intval($id_lang).') LEFT JOIN '._DB_PREFIX_.'feature_value_lang fvl ON (fvl.id_feature_value = pf.id_feature_value AND fvl.id_lang = '.intval($id_lang).') WHERE pf.id_product = '.intval($id_product).' ORDER BY `name` ASC'); /* Modify SQL result */ $resultsArray = array(); foreach ($result AS $row) { $row['name'] = preg_replace('/^[0-9]+\./', '', $row['name']); $resultsArray[] = $row; } return $resultsArray; } Now your can organize your features by putting the position in front of it, followed by a dot For example: 01.Feature1 02.Feature2
×
×
  • Create New...