Skip to content

Instantly share code, notes, and snippets.

@unlocomqx
Created November 21, 2020 09:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save unlocomqx/9fba6d16ce3fbf862e49736df7bf15f4 to your computer and use it in GitHub Desktop.
Save unlocomqx/9fba6d16ce3fbf862e49736df7bf15f4 to your computer and use it in GitHub Desktop.
<?php
// Fichier /modules/ps_shoppingcart/ps_shoppingcart.php
// Fonction renderModal
// Avant la ligne $this->smarty->assign(array( , ajouter le code
$customization_value = (int)$id_customization ?
Db::getInstance()->getValue('SELECT value FROM ' . _DB_PREFIX_ . 'customized_data WHERE id_customization = ' . (int)$id_customization) :
null;
// Après la ligne 'product' => $product,
'customization' => $customization_value,
'customization_data'=> array('value'=> $customization_value),
// -------------------
// Fichier /themes/[thème actuel]/modules/ps_shoppingcart/modal.tpl
// Après la ligne <img class="product-image" src= ou dans l'endroit désiré du popup
{if $customization}
{hook h='displayCustomization' customization=$customization_data mod='dynamicproduct'}
{/if}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment