Jump to content

amos-n-andy

Members
  • Posts

    13
  • Joined

  • Last visited

Profile Information

  • Activity
    Developer

amos-n-andy's Achievements

Newbie

Newbie (1/14)

0

Reputation

1

Community Answers

  1. For me it says: <br /><b>Notice</b>: Undefined index: serviceName in <b>/var/www/vm15513/data/www/nzcompany.ru/cache/smarty/compile/cc/5c/2d/cc5c2d6e164e11d85f3a0aa3874ec0e7f1f42d6b.file.order-form.tpl.php</b> on line <b>49</b><br /> where serviceName supposed to be GET parameter in a link like this http://nzcompany.ru/index.php?controller=order-form&service-name=123
  2. It's a .tpl for a custom created page with it's own Controller (not CMS page).
  3. I am using Prestashop 1.5. Sorry for trivial question. But how may I access GET parameters in .tpl files ? I tried {$smarty.get.parameterName} with no luck...
  4. Hi loulou66. Thanks for the reply. Maybe I wasn't clear enough but the goal I want to achieve is the link to the 2nd page like domain.fr/blog/entry Where blog is the 1st custom page and entry is the 2nd
  5. Hi all ! It is really easy to set up a new custom page in Prestashop. I’ll briefly reproduce this method for clarity: Create initial page in your prestashop root folder (e.g. your-page-name.php). Fill it with this code: <?php require(dirname(__FILE__).'/config/config.inc.php'); Tools::redirect('index.php?controller=your-page-name'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); Create controller in controllers/front/YourPageNameController.php. Fill in this code: <?php class YourPageNameControllerCore extends FrontController { public $php_self = ' your-page-name '; public function setMedia() { parent::setMedia(); $this->context->controller->addCSS(_THEME_CSS_DIR_.' your-page-name.css', 'all'); } public function displayContent() { parent::displayContent(); self::$smarty->display(_PS_THEME_DIR_.' your-page-name.tpl'); } } Create view in themes/yourTheme/ your-page-name.tpl. And voilà we have a new custom page which can be accessed like your-domain.fr/your-page-name But the question is how to create a “second-level” link for another subsidiary custom page like: your-domain.fr/your-page-name/another-custom-page ? P.S. I don’t really want to use Apache mod_rewrite for this purpose. Maybe this can be done with plain PHP methods? Like in Zend Framework where you can create actions for controller classes to achieve this link structure: your-domain.fr/controller-name/action-name/parameter1/value1/.../parameterN/valueN
  6. Greetings! I have Friendly URLs enabled on my site. But it works somewhat incorrectly. All links work fine without WWW in front of them. But if you add WWW all the internal links (all links except index page) redirect to 404. For example consider this link: http://gymrat.ru/7-velotrenazhery works fine, but if we add WWW in front of it http://www.gymrat.ru/7-velotrenazhery it shows 404 error code... How can I change my .htaccess file accordingly? Many thanks in advance!
  7. phew! It was some sort of url encode issue. I had to encodeURIComponent of the search input on submit event (via Javascript). I also had to employ some hidden input to store my newly encoded string to make it look nice. hope this topic will help others not to waste several hours. cheers
  8. Greetings! My quick search block doesn't work correctly. It shows proper results when I try searching for english titles and it shows nothing when I search for cyrillic titles. The odd thing is that ajax quick search is working just fine. For example when I make a search for the russian word "перчатки". I have the correct matches displayed in ajax quick search : But when I hit "Enter" it says: Please enter a search keyword. How do I fix it ? Thanks in advance!
  9. after disabling pretty urls image link changed from this: http://gymrat.ru/660-7[spam-filter]thickbox/kovrik-dlja-ellipticheskix-trenazherov-infiniti-asa081i-150.jpg to this http://gymrat.ru/img/p/660-7[spam-filter]thickbox.jpg Since I've already seen this version it was no help. I guess I would have to manually save these images. A good thing is there only 88 of them (out of 631). And I also noticed they are mostly images for products which were added later in time.
  10. There is no /img/p/660 directory. And I also tried searching the whole site for this particular 660-791.jpg (or 660-7[spam-filter]thickbox.jpg) with no luck.
  11. Hi there! I know most of the product images are located at img/p and that image file names are masked like productID-imageID.jpg. But some of the image files cannot be found on the entire site. Consider this link: http://gymrat.ru/img/p/660-791.jpg In fact there is no 660-791.jpg file in the img/p directory and on the entire site either. But it is still stored somewhere... I have Prestashop version 1.3. Many thanks in advance.
×
×
  • Create New...