Skip to content

Instantly share code, notes, and snippets.

View Crease29's full-sized avatar

Kai Neuwerth Crease29

View GitHub Profile
@Crease29
Crease29 / query.sql
Last active January 14, 2021 18:07
Shopware 6: Set smallest active product.main_variant_id (ordered by variant product_number)
UPDATE product AS mainProduct
SET main_variant_id = (
SELECT p.id
FROM product AS p
INNER JOIN product_option AS po
ON p.id = po.product_id
INNER JOIN property_group_option AS pgo
ON po.property_group_option_id = pgo.id
WHERE p.parent_id = mainProduct.id
AND (p.active IS NULL OR p.active = 1)
<?php
// ===================================================
// = place this file in the root of your OXID eShop! =
// ===================================================
require_once 'bootstrap.php';
// CONFIG
$sTheme = 'my_custom_theme';
// CONFIG END
<?php
// ===================================================
// = place this file in the root of your OXID eShop! =
// ===================================================
require_once 'bootstrap.php';
// CONFIG
$sTheme = 'azure';
$iLangId = 0; // German