prestashop

Prestashop adding product using module, cant force product_id

人盡茶涼 提交于 2019-12-13 15:07:47
问题 As topic says i have problem with adding product (by using product class). Everything works fine but even if i specify $product->id = 1234; it doest save it with this id, it just autoincrements products in database. But i really need to insert my own product_id into database (since i import products from ground strone database and they'll need to be updated often) Here is my code: $langId = (int) (Configuration::get('PS_LANG_DEFAULT')); $p = new Product($prod['towar_id']); $p->id = $prod[

Upgrading Prestashop from 1.7.0.3 to latest with 1-click Upgrade module

て烟熏妆下的殇ゞ 提交于 2019-12-13 10:20:03
问题 I currently have a 1.7.0.3 Prestashop that I'd like to upgrade to the latest stable version. When I start upgrading from the 1-click Upgrade module, the latest version is downloaded correctly but I get an error about the backup name not specified. I then disabled this option of backing up files and database as I couldn't find where to fill in this information (I made manual backups). I am then told that 17152 files have to be modified, whereas the version comparison tells me that only 5157

PrestaShop libraries replacement

﹥>﹥吖頭↗ 提交于 2019-12-13 10:19:54
问题 I use PrestaShop 1.6.1.4 and I want to change the library tcpdf with dompdf. I use this form for creating invoices. What are the best practices for a library exchange? 回答1: I created inside override the tools folder and I put us dompdf-master found here https://github.com/dompdf/dompdf. Instead inside override/classes/pdf i copied PDFGenerator.php, there is in classes/pdf. In PDFGenerator.php add: require_once('/../override/tools/dompdf-master/dompdf/Dompdf.php'); require_once('/../override

Add text inside header nav prestashop

拥有回忆 提交于 2019-12-13 09:09:21
问题 I am using prestashop open source cart, and I want to add text on top next to my 'call us now: number' I dont know how to add payment logos inside my footer next to my '@copyright:' below are some pictures of the desired outcome 回答1: You should need to edit your header.tpl file withing your theme. i.e. www.yourshop/themes/yourtheme/header.tpl SAQ 回答2: Have a look on blockbanner, there is a hook in Prestashop called hookBanner, which is located just above header. Editing header.tpl and footer

prestashop products on top menu

五迷三道 提交于 2019-12-13 07:24:46
问题 I am not very good with prestashop so i can not resolve my problem: i need to creare a drop down menu with sub category and products (like image). This is my situation, how you can you i have created sub-cat and now i need to show the products of categories, like first image. I have just searched in the web about any solution but i have not found it (or i have used worng keywords). i now this is possible because the first screen, is the demo of theme that i'm using: Thank you in advance to

Prestashop: switch theme on the fly and read cookie to check param in url

我的未来我决定 提交于 2019-12-13 06:43:47
问题 In order to setup an A/B testing (through GG Analytics), I planned to duplicate my current theme (for organisations purposes) in order to use the duplicated theme to do the alternate versions of the test. I use Prestashop 1.4.9.2 . What I already did, and works: Added this to /classes/FrontController.php , in displayHeader() function (I know I should override, but not the point ;)) : if(isset($_GET['alternate'])) { $cookie->alternate = "1"; $cookie->write(); } Replaced in /config/settings.inc

Password protection for a single .htaccess rewrite

二次信任 提交于 2019-12-13 06:25:51
问题 I need a password protection for a single site. This is a seo friendly url: The default path is: http://www.website-url.com/index.php?id_cms=xx&controller=cms and here is the seo url: http://www.website-url.com/content/xx-login I have already the .htaccess and .htpasswd, but how to specify rewriting in .htaccess only for this url? I tried this: <filesMatch "http://www.website-url.com/content/xx-login"> IndexIgnore .htaccess .htpasswd AuthUserFile /absolut_path/.htpasswd AuthName "Login"

How to add custom code to prestashop

心不动则不痛 提交于 2019-12-13 05:15:20
问题 I am trying to add the following code to my prestashop site to be able to display my google trusted site badge: <!-- BEGIN: Google Trusted Stores --> <script type="text/javascript"> var gts = gts || []; gts.push(["id", "STORE_ID"]); gts.push(["badge_position", "BOTTOM_RIGHT"]); gts.push(["locale", "english_australia"]); gts.push(["google_base_offer_id", "ITEM_GOOGLE_SHOPPING_ID"]); gts.push(["google_base_subaccount_id", "ITEM_GOOGLE_SHOPPING_ACCOUNT_ID"]); gts.push(["google_base_country",

How to change selected attribute via javascript

风流意气都作罢 提交于 2019-12-13 04:39:42
问题 I have an issue that I'm trying to solve. Need some advice to the right direction: With Prestashop when creating combinations, you have a dropdwon-list on product page where customer can choose the combination from. Here within the product.tpl file I have created some extra button to get customers attention for a certain combination. Now I would like this combination beeing automatically selected and activated when user clicks on that button. I have inputted some javascript code within the

Prestashop custom field in Product Feature not saving on Edit

99封情书 提交于 2019-12-13 04:34:06
问题 I have created a custom field for Product Feature in my module override. Custom field for Feature is not saving in the database on edit. But on Add new feature it works fine. Here is the code for my AdminFeaturesController.php file: <?php class AdminFeaturesController extends AdminFeaturesControllerCore { public function __construct() { $this->table = 'feature'; $this->className = 'Feature'; $this->list_id = 'feature'; $this->identifier = 'id_feature'; $this->lang = true; $this->fields_list =