Skip to content

Instantly share code, notes, and snippets.

@caovillanueva
caovillanueva / text.txt
Created October 17, 2022 16:21
[PS16 An error occurred while sending an email to the customer.] Error with Prestashop when change status, templates missing on database. #PS16
You need to look in your database using phpmyadmin, look for ps_order_state_lang here are the details for all of the possible order states.
Mine had several missing including in_transit which is the name of the template in public_html/mails/en
@caovillanueva
caovillanueva / Mail.php
Created October 3, 2022 18:12
[Send email with BCC] Sending copy mail in all website #PS16,#PS17
Meake an override here:
/override/classes/Mail.php
<?php
class Mail extends MailCore
{
@caovillanueva
caovillanueva / query.sql
Created August 11, 2022 14:47
[PS1.7 export products with images] Query where images path are included. #PS17
SELECT
p.id_product AS 'ID du produit',
p.active AS 'Actif (0/1)',
pl.name AS 'Nom',
GROUP_CONCAT(DISTINCT(cl.name) SEPARATOR ',') AS 'Catégories (x,y,z...)',
p.price AS 'Prix TTC ou HT à choix',
p.id_tax_rules_group AS 'ID règle de taxes',
p.wholesale_price AS 'Prix d_achat',
p.on_sale AS 'En soldes (0/1)',
IF(pr.reduction_type = 'amount', pr.reduction, '') AS 'Montant de la remise',
@caovillanueva
caovillanueva / text.txt
Created August 8, 2022 17:14
[Mysql Error this is incompatible with sql_mode=only_full_group_by laragon”. GROUP BY clause;] #Mysql
ON LARAGON:
just put this line:
[mysqld]
sql-mode="STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION"
restart mysql and done.
@caovillanueva
caovillanueva / terminal
Created August 3, 2022 18:04
[PS - NPM error ERR! code ELIFECYCLE] when using classic theme maybe you have this issue when trying to build the project. #PS17
Note: This command was run via npm module 'win-node-env'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `NODE_ENV=production webpack --progress`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
@caovillanueva
caovillanueva / info.txt
Last active June 22, 2022 18:42
[Bootstrap siz3s] Sizes used in bootstrap
xs (for phones - screens less than 768px wide)
sm (for tablets - screens equal to or greater than 768px wide)
md (for small laptops - screens equal to or greater than 992px wide)
lg (for laptops and desktops - screens equal to or greater than 1200px wide)
hidden-md-down
hidden-sm-down
@caovillanueva
caovillanueva / php.ini
Created May 20, 2022 15:58
[2G" is not a valid maximum size" Error] Error when try tu upload module in PS #php,#PS17
Es un problema de compatibilidad con Symfony. Busca "2G" en el fichero php.ini de tu hosting y sustituyelo por "2048M".
post_max_size = 2048M
upload_max_filesize = 2048M
@caovillanueva
caovillanueva / order_conf
Created May 19, 2022 17:15
[email text] Edit the message for some email strings #PS17
You can simply add a translation for the according text block. In the back office, go to Design -> E-Mail-Themes and click "Translate E-Mails" for your language. There, search for "(waiting for validation)" and add your translation. If you want to remove the message completely, simply type a single space character into the translation field. In my case, the message is gone from the order_conf e-mail then.
@caovillanueva
caovillanueva / file.sql
Created April 24, 2022 21:32
[PS1.7 Query to export producuts] Query to export products #PS17
EXPORT PRODUCTS PRESTASHOP 1.7
SELECT
p.id_product AS 'Product ID',
p.active AS 'Active',
pl.name AS 'Name',
GROUP_CONCAT(DISTINCT(cl.name) SEPARATOR ",") AS categories ,
p.price AS 'Price tax excluded',
p.id_tax_rules_group AS 'Tax rules ID',
p.wholesale_price AS 'Wholesale price',
@caovillanueva
caovillanueva / file.sql
Last active March 22, 2022 17:19
[mysql update column from another table] Coping info from specific colum from another table. #mysql,#PS17
UPDATE ps_product_shop c
JOIN table_test e ON c.id_product = e.id_product
SET c.id_category_default = e.id_category_default
note: tested.
------------------------------------------------
UPDATE TableB
SET TableB.value = (
SELECT TableA.value