Jump to content

Edit History

FilipeSilva11

FilipeSilva11

hello,

I need to create a variable to show the promo code user in the twig confirmation template ex:{{ order.promo }}, but i don't know where the variables are stored in prestashop, or if that is the correct way to do it.

Help? thanks

 

EDIT: i've added on "OrderConfirmationController.php":

$regra = $this->context->cart->getCartRules();
		$codigo = $regra[0]["code"];
        $this->context->smarty->assign(array(
            'HOOK_ORDER_CONFIRMATION' => $this->displayOrderConfirmation($order),
            'HOOK_PAYMENT_RETURN' => $this->displayPaymentReturn($order),
            'order' => $presentedOrder,
            'register_form' => $register_form,
			'codigo' => $codigo,
        ));

Returns nothing..

FilipeSilva11

FilipeSilva11

hello,

I need to create a variable to show the promo code user in the twig confirmation template ex:{{ order.promo }}, but i don't know where the variables are stored in prestashop, or if that is the correct way to do it.

Help? thanks

 

EDIT: i've added on "OrderConfirmationController.php":

$regra = $order->context->cart->getCartRules();
		$codigo = $regra[0]["code"];
        $this->context->smarty->assign(array(
            'HOOK_ORDER_CONFIRMATION' => $this->displayOrderConfirmation($order),
            'HOOK_PAYMENT_RETURN' => $this->displayPaymentReturn($order),
            'order' => $presentedOrder,
            'register_form' => $register_form,
			'codigo' => $codigo,
        ));

Returns nothing..

FilipeSilva11

FilipeSilva11

hello,

I need to create a variable to show the promo code user in the twig confirmation template ex:{{ order.promo }}, but i don't know where the variables are stored in prestashop, or if that is the correct way to do it.

Help? thanks

×
×
  • Create New...