Coder Social home page Coder Social logo

kevinseebach / thelia-v2-product-customize Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 44 KB

Personnalisation de produits sur Thelia2 via un champs texte que le client peut renseigner [non-maintenu]

License: MIT License

PHP 100.00%
thelia thelia-module php e-commerce module customize personnalisation perso

thelia-v2-product-customize's Introduction

Module de personnalisation de produit basic pour Thelia v2

Ce module permet de personnaliser des produits sur Thelia version 2 via un champs texte que le client peut renseigner. Utile pour les produits personnalisés au nom du client.

Pré-requis

Thelia version 2.3.3 ou 2.3.4 - Module non testé sur les autres versions

Installation

Manuelle

  • Copier le module dans <thelia_root>/local/modules/PersoProduit et assurer vous que le dossier soit bien nommé PersoProduit
  • Aller dans votre panneau d'administration des modules et activer le module
  • Ajouter votre formulaire et l'affichage des champs dans vos template

Via composer

  • Aller à la racine de votre installation Thelia 2
  • Lancer la commande composer require abraham63/thelia2-product-customize

Utilisation

Formulaire

Ce module ajoute un champs dans le formulaire d'ajout au panier à rajouter dans le template de la page produit (dans le form d'ajoute au panier)

  {form_field field='champs_perso'}
      <input id="{$name}" class="{$name}" type="text" name="{$name}" value="{$VALUE}" {$attr} >
  {/form_field}

Loop

Loop panier

Cette boucle permet de récuperer le champs de personnalisation au niveau du panier

Input arguments
Argument Description
item_id Id de l'élément dans le panier (cart item)
Output values
Argument Description
personnalisation Valeur du champs de personnalisation
{loop type="personnalisation.produit" name="personnalisation_du_produit" item_id="$ITEM_ID"}
   <span>{$personnalisation}</span>
{/loop}

Loop commande

Cette boucle permet de récuperer le champs de personnalisation au niveau de la commande

Input arguments
Argument Description
order_prod_id Id de l'élément dans la commande
Output values
Argument Description
personnalisation Valeur du champs de personnalisation
  {loop type="order.personnalisation.produit" name="qsifoqds" order_prod_id=$ID}
   <span>{$personnalisation}</span>
{/loop}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.