Jump to content

vodalus

Members
  • Posts

    7
  • Joined

  • Last visited

Profile Information

  • Location
    Ireland
  • Activity
    Other

vodalus's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi I have been asked to make a small change to a prestashop 1.6.0.9 site. Currently when a product is loaded that has multiple colours available the first product in the colours select list is automatically selected and the main image displays the image for that colour rather than the image which is set as "cover" for that product. The client would like that no colour be automatically selected when the page loads and that the cover image be loaded first and not changed until a specific colour is selected. I have been able to get the select dropdown list not to be set to a specific colour just by adding "<option value="">Select One</option> to the template file however this does not stop the image for the first colour option from loading. How do I make it so that the "cover" image for a product is displayed when a product page is first loaded? Thanks
  2. Hi I have just upgraded prestashop from 1.5.6.0 with the one-click installer. I'm not sure if it upgraded it to 1.6.0 or a slightly higher number. The log in screen in the back end appears but when I enter my details I get a blank screen. I've tried turning on error reporting in the admin index.php file but no errors are appearing, just a completely blank screen. The front end screen is stuck in maintenance mode. I tried searching the theme to see if I could see anything about compatibility with v1.6 but I didn't see anything. It is called theme767. There are no theme related error messages anyway. I have also tried increasing the memory limit, again with no luck. Any suggestions much appreciated!
  3. Thanks for that greenpesto. It's still a mystery to me why it changes when the link is assigned to a variable and reused rather than regenerated by a function. I tried assigning the link to another variable and reusing that on the image instead of the $link but that also changed. I've no idea how to fix it but I guess it's not a huge deal.
  4. I am also trying to make the thumbnail images clickable but for some reason the link on the thumbnail (line 496) is not the same as the link on the text (line 476) even though they both use the same $link variable. I can't figure it out. The link is assigned just before the text link - $link = $this->context->link->getPageLink('index'); The value of this same variable is changed when it is used to wrap the thumbnail image inside <a></a> tags and I just can't see why. Can anyone enlighten me? Here is the generateCategoriesMenu() function private function generateCategoriesMenu($categories) { $html = ''; foreach ($categories as $key => $category) { if ($category['level_depth'] > 1) { $cat = new Category($category['id_category']); $link = Tools::HtmlEntitiesUTF8($cat->getLink()); } else $link = $this->context->link->getPageLink('index'); $html .= '<li'.(($this->page_name == 'category' && (int)Tools::getValue('id_category') == (int)$category['id_category']) ? ' class="sfHoverForce"' : '').'>'; <!-- first use of $link -->$html .= '<a href="'.$link.'" title="'.$category['name'].'">'.$category['name'].'</a><!-- end link -->'; if (isset($category['children']) && !empty($category['children'])) { $html .= '<ul>'; $html .= $this->generateCategoriesMenu($category['children']); if ((int)$category['level_depth'] == 2) { $files = scandir(_PS_CAT_IMG_DIR_); if (count($files) > 0) { $html .= '<li id="category-thumbnail">'; foreach ($files as $file) if (preg_match('/'.$category['id_category'].'-([0-9])?_thumb.jpg/i', $file) === 1) <!-- second use of $link -->$html .= '<div><a href="'.$link.'" title="'.$category['name'].'"><img src="'.$this->context->link->getMediaLink(_THEME_CAT_DIR_.$file) .'" alt="'.Tools::SafeOutput($category['name']).'" title="' .Tools::SafeOutput($category['name']).'" class="imgm" /></a></div>'; $html .= '</li>'; } } $html .= '</ul>'; } $html .= '</li>'; } return $html; }
  5. Hi We have installed prestashop 1.6.05 and it installed ok however we are having trouble with anything that takes a little time. We have increased the script execution time in the htaccess and asked the hosting company to help to make sure we did it correctly. If we try to generate new thumbnail images we get a 500 internal server error and the log shows "Premature end of script headers". If we try the db_backup the same thing happens. The hosting company have only suggested that presta is maybe not compatible with php 5.3 but that doesn't seem to be the case. They say that the error message means PHP isn't getting all the information it needs in order to run the script. Has anyone encountered and resolved such an issue?
  6. Thanks TreeTheme Dev The default prestashop theme seems to use a 'mobile' sub directory for it's mobile layout and I gather from the link above (http://doc.prestashop.com/display/PS15/Managing+Modules+and+Themes#ManagingModulesandThemes-PrestaShop%27smobiletemplate) that this is the standard way of adding a mobile template. This site I'm looking at doesn't use the default presta theme, it uses a different one and it doesn't have a 'mobile' sub directory. If I want to override this theme on mobile devices should it be as simple as dropping in a mobile folder containing a mobile theme in to the main them directory in order to override the main theme? I experimented with this approach on a different site - I replaced the content of the mobile directory with the contents of a different theme's mobile directory but it didn't work at all.
  7. Hi I am very new to Prestashop. Is it possible to have two themes and speficy in the settings/preferences that one of them should load for mobile users? I don't see any such option there so I suspect it is not that simple. I know using a responsive theme would be a more straightforward solution but in this case they want to keep the old theme and just use the new one for mobile. Thanks
×
×
  • Create New...