Skip to content

Instantly share code, notes, and snippets.

View Zszywaczyk's full-sized avatar

Patryk Chowratowicz Zszywaczyk

View GitHub Profile
@Zszywaczyk
Zszywaczyk / Export Products from Prestashop 1.6.1 to Woocommerce.sql
Last active September 28, 2024 14:19
MySQL script for exporting products, users from PrestaShop 1.6.1, intended for migration to WooCommerce.
SET @base_url := 'https://example.com';
SELECT * FROM (
-- Part 1: Basic Products (without combinations)
SELECT
p1.id_product AS product_id,
pl1.name AS product_name,
pl1.link_rewrite AS link_rewrite,
pl1.meta_description AS meta_description,
pl1.meta_keywords AS meta_keywords,
@Zszywaczyk
Zszywaczyk / Bash script - linux console
Last active October 29, 2023 04:09
Wordpress MySQL script to change URL from old to new
//Not tested yet!
1. Create bash script eg. bash.sh
2. Write:
#!/bin/bash
DB_USER="your_db_user"
DB_PASS="your_db_password"
DB_NAME="your_db_name"
mysql -u$DB_USER -p$DB_PASS $DB_NAME << EOF
1. Open CDM as Administrator
2. Type: setx PATH "%PATH%;C:\xampp\php" /m
3. Close and reopen CMD as administrator
4. For test type: php -v
5. Type setx PATH "%PATH%;C:\xampp\mysql\bin" /m
6. For test type: mysql -V