prestashop

add category programmatically prestashop

时光怂恿深爱的人放手 提交于 2019-12-10 09:28:57
问题 I would like to add categories programmatically to prestashop, i tried this code $object = new Category(); $object->name = "xcvxvvx"; if (!$parent_id){ $parent_id = Configuration::get('PS_HOME_CATEGORY'); } $object->id_parent = $parent_id; $object->link_rewrite = array((int)(Configuration::get('PS_LANG_DEFAULT')) => $category); $object->add(); $object->id_category = $object->id; $object->id_category_default = $object->id; $object->update(); I get this error message : Fatal error: Uncaught

Prestashop and web service(Restful), HttpURLConnection, BufferedReader

寵の児 提交于 2019-12-09 23:39:10
问题 I want to access the resources of a site created by prestashop via restful web services, which I enter the URL you must enter a key (that is generated by prestashop when we create a restful web service) in the field of username. so I am trying to read a xml string: <?xml version="1.0" encoding="UTF-8"?> <prestashop> <manufacturers> <manufacturer id="1" xlink:href="http://127.0.0.1/test/api/manufacturers/1" /> <manufacturer id="2" xlink:href="http://127.0.0.1/test/api/manufacturers/2" /> <

Prestashop - Change order status when payment is validated

天涯浪子 提交于 2019-12-09 18:33:35
问题 When a payment is validated, the order status becomes "Payment validated" ("Paiement accepté" in french). I want to set another status when payment is validated, so the history would show the following : Current status : My personnal status History : My personnal status Payment validated To do so, I use the hook actionOrderStatusPostUpdate. This is my code : public function hookActionOrderStatusPostUpdate($aParams) { $oOrder = new Order($aParams['id_order']); if($aParams['newOrderStatus']->id

Prestashop Error 404 at moving to server

江枫思渺然 提交于 2019-12-08 18:34:27
At moving from local to a server my prestashop web, appears all the text (I think it connects correctly to the database), but it doesn´t visualizing any images,CSS,etc... I´ve modified config/settings.inc.php file and modified PS_SHOP_DOMAIN, PS_SHOP_DOMAIN_SSL and SHOP_URL from the database and also deleted the .htaccess file. Thanks! The same is with the backoffice: you can do it by two ways: navigate into backoffice to SEO&URL link, set correct values for Shop domain & SSL domain & Base URI fields. Save & update page. or in DB find tables: ps_configuration , set correct values for PS_SHOP

How to integrate msg91 php api with Prestasms or Prestashop?

情到浓时终转凉″ 提交于 2019-12-08 14:15:49
问题 <?php error_reporting(E_ALL ^ E_NOTICE);ini_set('error_reporting', E_ALL ^ E_NOTICE); define('IS_ADMIN_FLAG', false); include_once(dirname(__FILE__).'/../../config/config.inc.php'); include_once(dirname(__FILE__).'/../../config/setting.inc.php'); include_once('includes/model/smsAdapter.php'); include_once('includes/model/sms.php'); include_once('includes/model/variables.php'); class ControllerSmsApi { public function __construct() { $this->index(); } public function index() { die("DISABLED");

Upgrade Prestashop from 1.6.0.11 to 1.7 (latest version)

大憨熊 提交于 2019-12-08 11:56:06
问题 I want to upgrade prestashop from 1.6.0.11 to 1.7 (latest version). First, I have tried 1-click upgrade but did not worked for me. See these screenshots http://prntscr.com/ek46kr, http://prntscr.com/ek46nb, http://prntscr.com/ek46sa. Second, I have tried with manual steps like this link http://doc.prestashop.com/display/PS16/Manual+update, but this also not worked ! See screenshot http://prntscr.com/ek4dbv If anybody know perfect steps to upgrade prestashop 1.7 please answer here. It will be

Autoload module class in Prestashop

我是研究僧i 提交于 2019-12-08 10:50:26
问题 I've created a module that has an override for the FrontControllerCore class to add additional Smarty variables. The issue I'm running into is trying to autoload a class that is referenced in the controller that is in my module. The class isn't being loaded and I don't know how to add it to the autoloader. 回答1: When you install the module the FrontController.php file should be located in: override\classes\controller\ so from the FrontController.php you can "include" manually that file like:

PrestaShop 1.6 Upgrade, Images Question Mark

岁酱吖の 提交于 2019-12-08 09:55:02
问题 I've upgraded my prestashop installation from 1.4 to 1.6 successfully with only 1 side effect. The product images are now questions marks. http://prestastore.webdirective.com/catalog/ Ive already tried a few forums but no fix. I need help where to start checking. Im fairly new to prestashop so be elaborate. Thanks! 回答1: There are few approaches for solving this problem: Try regenerating the .htaccess file (BackOffice > Preferences > SEO & URLs > [Save]) Try regenerating the images (BackOffice

Prestashop 1.6 extend max size of product feature value

╄→гoц情女王★ 提交于 2019-12-08 09:12:24
问题 This is my first question on stackoverflow :) I need to import a csv file with product features values longer than 128 characters. How can I extend the maximum size of product features values in prestashop 1.6? 回答1: The feature value field should be 255 characters long, unless you are using some special characters or different encoding. Anyway, change the column type in ps_feature_value_lang table to your preference, Then make an override for FeatureValue.php class. Make a file at override

prestashop 1.6 custom page don't work?

蓝咒 提交于 2019-12-08 08:41:43
问题 I have create a Test controller using the code in : Create Custom page in Prestashop 1.5.3.1 class MyPageController extends FrontController { public $php_self = 'mypage'; public function init() { parent::init(); } public function initContent() { parent::initContent(); die('test!'); } } I put it in the /controllers/front/MyPageController.php and it does not work. i get a clean html page. What am I missing ? link to custom page : http://www.funtoy.co.il/index.php?controller=MyPage Edit 1 : fix