prestashop

How to Set Category Page as Home Page in Prestashop

时光怂恿深爱的人放手 提交于 2019-12-03 09:59:15
问题 I am having http://example.com/index.php as my home page. My Category Page URL is http://example.com/index.php?id_category=10&controller=category Now, I need to redirect my homepage to Category Page. I tried in Preferences > SEO & URL's > Set Shop URL > Base URI as index.php?id_category=10&controller=category Now, the page is redirecting to my Category Url but the page is not opening. the URL is showing like this http://example.com/index.php?id_category=10&controller=category/index.php? 回答1:

The right way to add a new field in admin product page in Prestashop 1.7

二次信任 提交于 2019-12-03 08:00:41
I've created a module for Prestashop 1.7 in order to add a new field in the Admin Product page. Due to the lack of proper documentation, I want to ask the proper way to add my custom field, a select. I want to get saved and updated on product save. I use the code below to add a tpl containing a form public function hookDisplayAdminProductsExtra($params) { $this->smarty; $available_items = $this->getAvailableBadges(); $id_product = Tools::getValue('id_product'); $this->context->smarty->assign('items_number', $available_items); return $this->display(__FILE__, '/views/templates/admin/admin

Prestashop compared to Zen-Cart and osCommerce [closed]

时光总嘲笑我的痴心妄想 提交于 2019-12-03 04:23:48
I'm considering Prestashop for a new project. It seems to be younger than Zen-Cart and osCommerce. Since I just found it by Google, I'd like to gather comments and experience and comparison of Prestashop to established "brands" like Zen-Cart and osCommerce As one that love working with Magento i just wanted to show you this article. If i were in the works of setting up an site for online commerce, i wouldn't choose ZenCart or OSC. They are both old and doesnt update at all. But thats just an personal opinion. And i work a lot with these things. My Prestashop knowledge is limited though, but if

Make an ajax request from a Prestashop module

泪湿孤枕 提交于 2019-12-03 04:02:53
I am making a module and I need to make an ajax request, with JSON response if possible, how can i do this ? I don't understand really well the structure of Prestashop 1.7 on this. Thanks ! This is pretty simple, you just have to make the controller with Prestashop's standards then link it to your frontend Javascript. Name a php file like this : ./modules/modulename/controllers/front/ajax.php Then put inside : <?php // Edit name and class according to your files, keep camelcase for class name. require_once _PS_MODULE_DIR_.'modulename/modulename.php'; class ModuleNameAjaxModuleFrontController

Prestashop how to add static contents in different language in tpl file

匿名 (未验证) 提交于 2019-12-03 03:04:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I need add some custom text in Prestashop template file, but there are two languages in my store, and I want to add these contents in different language statically? Can I check current language by language id? 回答1: statically {if $lang_iso == en } english text {else} Other language {/if} 回答2: You have multiple ways to achieve this goal depending on the kind of .tpl file you are editing: If it is a .tpl in your Theme, the easiest way is: {l s='My text to translate'} If it is .tpl file included in a module, you should do the following: {l s=

How to Set Category Page as Home Page in Prestashop

余生颓废 提交于 2019-12-03 01:29:59
I am having http://example.com/index.php as my home page. My Category Page URL is http://example.com/index.php?id_category=10&controller=category Now, I need to redirect my homepage to Category Page. I tried in Preferences > SEO & URL's > Set Shop URL > Base URI as index.php?id_category=10&controller=category Now, the page is redirecting to my Category Url but the page is not opening. the URL is showing like this http://example.com/index.php?id_category=10&controller=category/index.php ? You are doing it the wrong way. Do it as followed: A) Easy but not recommended Way: 1) Open Controllers

Integrate PrestaShop Webservice with Laravel 5

匿名 (未验证) 提交于 2019-12-03 01:06:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to integrate the Prestashop 1.6 WebService into my Laravel 5.3 project to retrieve data. Has anybody ever done this or know of any link which could help me? EDIT: My idea is, inside my Laravel app, whenever I click a specified like, it retrieves that data from my PrestaShop backoffice. For example, if I click on the Customers links inside my Laravel App, it shows the all the Customer information from currently in my PrestaShop back-office. 回答1: I managed to find a solution. This link: https://packagist.org/packages/protechstudio

Prestashop 订单页面出现异常 must be of the type array, string given

匿名 (未验证) 提交于 2019-12-03 00:32:02
ContextErrorException in PaymentOption.php line 305: Catchable Fatal Error: Argument 1 passed to PrestaShop\PrestaShop\Core\Payment\PaymentOption::convertLegacyOption() must be of the type array, string given \src\Core\Payment\PaymentOption.php public static function convertLegacyOption(array $legacyOption) public static function convertLegacyOption($legacyOption) 文章来源: Prestashop 订单页面出现异常 must be of the type array, string given

URL structure changed after CMS update

孤街浪徒 提交于 2019-12-02 19:55:20
问题 I take in charge the update of an existing Prestashop 1.4.1.4 website. The url for a product was like: url/product.php?id_product=1322 But when I update to the new version 1.6.0.6, it became like: url/index.php?id_product=1372&controller=product&id_lang=2 When I type in the browser: url/product.php?id_product=1322 It leads me to 404 page. Your help is appreciated. 回答1: product.php was deprecated in PrestaShop 1.5 and was removed in PrestaShop 1.6. Download PrestaShop 1.5 and copy product.php

Searching through multiple ng-repeats at once

心不动则不痛 提交于 2019-12-02 17:37:21
问题 i'm currently working on an application that is build with AngularJS as a base, and that obtains data through the prestashop webservice. All data obtained are JSON strings sorted through multiple files. Now i'm trying to create a searchbox that filters through some objects the moment the user fills in the searchbox. The easy way is ofcourse by using the ng-model and filter: combination like below: angular.module('myApp', []).controller('namesCtrl', function($scope) { $scope.names = [ 'Jani',