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 / custom.js
Created September 18, 2026 14:57
Ekip
// Designer / Quote module adaptation
document.addEventListener('dsn.load', function () {
const cart_button = document.querySelector('#dsn-add-to-cart-btn')
if (!cart_button) return;
const quote_button = document.querySelector('#btn-cqw-add-to-quote')
if (!quote_button) return;
const label = document.querySelector('#btn-cqw-add-to-quote span')
const new_quote_button = jQuery('<button class="dsn-button dsn-primary" type="button"><i class="fa fa-cart-plus"></i> <span>' + label.textContent + '</span></button>')
@unlocomqx
unlocomqx / custom.css
Created September 15, 2026 13:54
dynamicproduct - hide add to cart until the configurator is loaded
body.dynamicproduct:not(.dp-loaded) button.add-to-cart {
display: none !important;
}
@unlocomqx
unlocomqx / hide-fonts-colors.css
Created August 31, 2026 11:50
Product Designer - masquer les polices et les couleurs de texte
/* Product Designer - masquer les polices et les couleurs de texte */
/* A ajouter dans le CSS personnalise de votre theme */
/* Groupe "Polices" */
#dsn-fieldset-text-fonts {
display: none;
}
/* Groupe "Couleurs de texte" */
#dsn-fieldset-text-colors {
@unlocomqx
unlocomqx / dsn-required.css
Created August 28, 2026 15:13
productdesigner - masquer le bouton d'ajout au panier quand la personnalisation est obligatoire
/* Masquer le bouton d'ajout au panier quand la personnalisation est obligatoire */
body.dsn-required .product-add-to-cart {
display: none;
}

Journal des modifications (Changelog)

Toutes les modifications notables de ce projet seront documentées dans ce fichier. Consultez les directives de commit pour plus d'informations.

1.229.19 (06-05-2026)

Fonctionnalités

  • CartButton utilise la configuration dynamic_tab pour activer le bon onglet
window.dp = {
hook(container) {
const product_actions = document.querySelector('.product-actions,.js-product-actions');
if (product_actions) product_actions.prepend(container);
},
Document 1:
{
"pageContent": "You can use the getField function to get the properties of a field.\n\njs\n\nwindow.dp.methods.getField(field_name);\nvar props = window.dp.methods.getField(\"width\");\n\nThe value of props will have this shape\n\njs\n\n{\n active: 1\n common: 0\n description: \"\"\n dir: \"/dynamicproduct/images/field\"\n ext: \".jpg\"\n favorite: 0\n force_id: false\n id: 66\n id_group: \"0\"\n id_product: 11\n id_unit: 0\n image_url: null\n init: 0\n label: \"Width\"\n linked: \"0\"\n name: \"width\"\n options: []\n position: \"2\"\n settings: {\n color: null\n dir: null\n display_in_popup: null\n display_secondary_value_price: null\n display_value_price: null\n ext: \".jpg\"\n extensions: null\n extra: null\n force_id: false\n hide_when_empty: 1\n id: null\n id_field: 66\n id_unit: null\n init: null\n max: null\n max_date: null\n max_size: null\n min: null\n min_date: null\n min_height: null\n min_width: null
You are a helpful assistant for managing DynamicProduct logic and answering questions about DynamicProduct.
Available tools:
<tools>
[46]:
- name: create_field
description: Create a new dynamic field
parameters:
type: object
properties:
Product Configuration:
active: true
required: false
exclude: false
displayed_price: 0
displayed_price_label:
display_starting_from: true
display_dynamic_price: false
display_customization_cost: false
recalc: false
{
"nodes": [
{
"parameters": {
"jsonMode": "expressionData",
"jsonData": "={{ $json.documentation }}",
"textSplittingMode": "custom",
"options": {}
},
"id": "0a52ad6e-9c9c-415f-b1ec-f1782678cdd5",