Jump to content

Total discount en order-confirmation.tpl


maria_skyyield

Recommended Posts

Vale puedes hacer un override de la controllador y agregar esto 

/**
	 * Assign template vars related to page content
	 * @see FrontController::initContent()
	 */
	public function initContent()
	{
		parent::initContent();
                 $order = new Order($this->id_order);

       
		$this->context->smarty->assign(array(
			'is_guest' => $this->context->customer->is_guest,
			'HOOK_ORDER_CONFIRMATION' => $this->displayOrderConfirmation(),
			'HOOK_PAYMENT_RETURN' => $this->displayPaymentReturn(),
                        'descuento' => $order->total_discounts
		));
               

		if ($this->context->customer->is_guest)
		{
                    
			$this->context->smarty->assign(array(
				'id_order' => $this->id_order,
				'reference_order' => $this->reference,
				'id_order_formatted' => sprintf('#%06d', $this->id_order),
				'email' => $this->context->customer->email,
				
			
				
			));
			/* If guest we clear the cookie for security reason */
			$this->context->customer->mylogout();
		}



		$this->setTemplate(_PS_THEME_DIR_.'order-confirmation.tpl');
	}

y al tpl le pasas la varable descuento.

  • Like 1
Link to comment
Share on other sites

  • nadie locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...