Jump to content

INSERE LE MODULE SHIPING ESTIMATE DIRECTEMENT SUR LA PAGE PRODUIT


Recommended Posts

Bonsoir,
J' aimerai pouvoir afficher le module shiping estimate directement sur la fiche produit je pense qu il faut modifier le code pour déclarer d' autre crochets si qq'un peut m' aider merci
<?php
/**
* Shipping Estimator
* @category blocks
*
* @author Aaron Weatherall / AU PHP Developer / Sitefx.com.au
* @copyright Sitefx Online Pty Ltd
* @license http://www.opensource.org/licenses/osl-3.0.php Open-source licence 3.0
* @version 1.2
*/

class ShippingEstimate extends Module
{
private $_html = '';
private $_postErrors = array();

function __construct()
{
$this->name = 'shippingestimate';
$this->tab = 'Tools';
$this->version = 1.1;

parent::__construct();

$this->displayName = $this->l('Shipping Estimator for Shopping Cart');
$this->description = $this->l('Allows customers to see shipping prices prior to checkout. This module is donationware, if you like this module, please donate');
}

public function install()
{
parent::install();
$this->registerHook('shoppingCart');
}

public function hookShoppingCart($params)
{
global $smarty, $cookie, $cart;

$address = new Address(intval($cart->id_address_delivery));
if ($address->id_country)
$selectedCountry = $address->id_country;

$countries = Country::getCountries(intval($cookie->id_lang), true);

$smarty->assign(array(
'countries' => $countries,
'sl_country' => (isset($selectedCountry) ? $selectedCountry : 0)
));

return $this->display(__FILE__, 'shippingestimate.tpl');
}

}

?>

Link to comment
Share on other sites

Salut fred

Ben en fait j'ai réussi en créant un nouveau hook que j'ai placé sur la fiche produit.

Puis j'ai mis le module dedans en passant par le back office > module > position.

La j'ai pas trop le temps mais fais une recherche sur le forum sur comment créer un hook.

A plus...je file.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...