prestashop

401 Error when connecting to PrestaShop webservice from android

十年热恋 提交于 2019-12-07 15:37:54
问题 I am trying to call a webservice in PrestaShop but i get 401 not authorized error. Even though i have passed the username key. I tried the authenticator too but i get an error HttpRetryingError. Find below the code snippet of what i have done. Method one: final String username = "key_here"; final String password = "";// leave it empty URL urlToRequest = new URL(urlStr); urlConnection = (HttpURLConnection) urlToRequest.openConnection(); urlConnection.setDoOutput(true); urlConnection

How to remove delivery shipping step on prestashop 1.6.1?

六月ゝ 毕业季﹏ 提交于 2019-12-07 12:32:28
问题 I'm new to prestashop and I'm having major trouble removing the delivery shipping step because I only sell virtual products. I am using prestashop 1.6.1. I know I have to modify order-carrier.tpl file and have followed several posts here and there but couldn't get it done right. Does any of you have any actual idea on how to do this ? 回答1: Bonjour, here is what i did Override AdminOrderPreferencesController and add a boolean configuration field to toggle this functionnality $this->fields

How to remove override , when uninstalling the module in prestashop?

偶尔善良 提交于 2019-12-07 08:35:43
问题 Am overriding the classes and controllers using my module. But when uninstalling it didn't remove the override files in override folder which are created using this module. because of this am getting an error "Unable to install override: Class CartOverrideOriginal does not exist" when am trying to install second time. can anyone help me, how to remove those files when uninstalling the module itself and not manually.. Do I need to write any function to achieve this? 回答1: Please note that

How does prestashop loads Images?

喜夏-厌秋 提交于 2019-12-07 08:19:24
I have 2 prestashop stores hosted in the same ftp with the same products one of them have all the images loaded (Over 9k) and the other has none, I want to know from what controller and function does prestashop loads the images. I know the images are stored inside /img/p {digits with slashes}/product_id.jpg so the only thing I'm missing is the place where the images are loaded in the front end so I can alter that function and make it point to the photos of the other shop in order to avoid the job of uploading each of the photos on the second store. I have php knowledge so I'm looking for a way

ERR_TOO_MANY_REDIRECTS in backoffice when running Prestashop in Docker

梦想与她 提交于 2019-12-07 08:12:27
问题 I'm trying to make a docker environment for a Prestashop project. I have it almost working but for some reason, the back office is inaccessible - it gives me a ERR_TOO_MANY_REDIRECTS error. I changed the urls in shop_url table and changed PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL to no vain. I tried to disable friendly URLs, enable/disable SSL - but the problem persists. I'm using a custom image for a webserver: luken-wodby-nginx-prestashop Dockerfile: FROM wodby/nginx:1.10 ENV WODBY_DIR_FILES

Cart products dissapear on refresh page Prestashop

淺唱寂寞╮ 提交于 2019-12-07 07:42:26
since some weeks I have a problem with my Prestashop 1.4.0.12 When I add a product to cart, ajax works correctly and add the product very well. But, if I change page, or sometimes adding a product, the cart change deleting all products on refresh a new page. Sometimes I can move within some pages, but dissapears the products of the cart and later if I have a new cart returns to the old cart. Anybody knows about it? I think that the problem is on id_guest but I need to know if anyone have some solution Thanks! The problem is on Domain Name, that site have 3 domains, and there are a function on

PrestaShop Images

自闭症网瘾萝莉.ら 提交于 2019-12-07 06:11:15
问题 I have Prestashop 1.4.9.0 installed with my PHP project. When I add a new product, I upload an image in PNG format, but when it is shown on the client side, the image is in JPG format. How can you keep the image extension? 回答1: At Back Office > Preferences > Images you have 3 options for "Image quality": Use JPEG Use PNG only if the base image is in PNG format Use PNG for all images By default all the images are in JPEG (PNG are converted), so you can either choose to use the 2nd option (to

How to display product price with and without tax at a time in product list for Prestashop?

牧云@^-^@ 提交于 2019-12-07 03:19:31
问题 In the product list I need to display the product price with and without tax at a time. I am using the version 1.6 of Prestashop. Right now the price including tax is displayed in the product list. I want to display the price excluding tax as well. How can I do that? I have searched for solution and was not able to find a working solution for me. 回答1: Find the following block in product-list.tpl : {foreach from=$products item=product name=products} Add this to display price without tax:

Prestashop custom layout for specific category

纵然是瞬间 提交于 2019-12-07 01:04:46
Can I have a specific category layout for selected categories? The detail page will be the same, I need to get a custom tpl file. Thanks for suggestions Pretty easy to do: override the category controller to set the template. class CategoryController extends CategoryControllerCore { // array with the selected categories private $customCategories = array(1, 3); public function init() { parent::init(); if (in_array($this->category->id, $this->customCategories)) { $this->setTemplate(_PS_THEME_DIR_.'category-custom.tpl'); } } } Here you wouldn't be able to change the selected categories from the

Create order with PrestaShop's API

*爱你&永不变心* 提交于 2019-12-06 16:37:36
I have a PrestaShop 1.6.0.9 and I'm trying to create a new order. I'm following the following steps: Create a cart with the security key of the client I have previously created, the id of the product I want to buy and the quantity. Then create a new order (sending a POST to /api/order ), passing the client id, the security key, the product id, the prices (with and without taxes), etc... This is the entire XML that I send: <?xml version="1.0" encoding="UTF-8"?><prestashop><order> <id_address_delivery>5</id_address_delivery> <id_address_invoice>5</id_address_invoice><id_currency>1</id_currency>