Skip to content

Instantly share code, notes, and snippets.

View unlocomqx's full-sized avatar
🏠
Working from home

Tuni-Soft unlocomqx

🏠
Working from home
  • Module Dev - Tuni-Soft
  • [object Object]
View GitHub Profile
@unlocomqx
unlocomqx / CHANGELOG.md
Created October 3, 2023 11:43
ProductDesigner
@unlocomqx
unlocomqx / sku.sql
Last active September 29, 2023 14:14
SELECT COALESCE(SUM(od.product_quantity), 0) FROM ps_dynamicproduct_dropdown_option op
LEFT JOIN ps_dynamicproduct_field f on op.id_field = f.id_field
LEFT JOIN ps_dynamicproduct_input_field inf on op.id_field = inf.id_field
LEFT JOIN ps_dynamicproduct_input inp on inf.id_input = inp.id_input
LEFT JOIN ps_order_detail od on inp.id_customization = od.id_customization
WHERE op.sku = 'XXXXXX'
@unlocomqx
unlocomqx / App.svelte
Created September 28, 2023 06:01 — forked from jrmoynihan/App.svelte
A helper function for setting Svelte 5 $state() runes on objects
<script lang="ts">
import { gettable, settable, runed } from './runes.js'
const createFruit = (obj) => {
// An optional object of default values if the provided prop is nullish
const defaults = {
color: 'purple',
consumed: true,
count: 0
}

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

1.176.0 (2023-09-14)

Features

  • Add possibility to change item dimensions unit (mm,cm,m,in,ft) (ed2c0bc)
<?php
// path: /override/classes/order/Order.php
class Order extends OrderCore
{
public function __construct($id = null, $id_lang = null)
{
$this->webserviceParameters['associations']['order_rows']['fields']['additional_content'] = ['required' => false, 'xlink_resource' => 'customizations'];
parent::__construct($id, $id_lang);
<?php
class Product
{
public static function getProductProperties($id_lang, $row, Context $context = null)
{
$row = self::dynamicGetProductProperties($id_lang, $row, $context);
if (!Module::isEnabled('groupinc') || (empty($row) || !isset($row) || !isset($row['id_product']))) {
return $row;
let inserted = false
try
inserted = db.insert(.....)
catch
console.log(e)
if (inserted)
throw redirect(....)
SELECT od.id_order_detail FROM ps_dynamicproduct_input d
LEFT JOIN ps_order_detail od ON od.id_customization = d.id_customization
WHERE d.date_upd < NOW() - INTERVAL 30 DAY
AND ISNULL(od.id_order_detail)
LIMIT 10;
<?php
Fichier /classes/M4OrderDetail.php
Ligne 142
// add customization summary
$customization_summary = '';
if ((int) $detail['id_customization']) {
$value = (int) Db::getInstance()->getValue('
SELECT `value`
CREATE TABLE IF NOT EXISTS `pr_tunisoft_customization_field`
(
`id_customization_field` int(11) NOT NULL,
`id_module` int(11) NOT NULL,
PRIMARY KEY (`id_customization_field`, `id_module`)
) ENGINE = InnoDb
DEFAULT CHARSET = utf8;