Hikashop 3 checkout status view

  • Posts: 1119
  • Thank you received: 114
7 years 10 months ago #259981

Hi,

In the old checkout status view i have such code:

<?php
$app = JFactory::getApplication();
    $order = $app->getUserState( HIKASHOP_COMPONENT.'.checkout_fields',null);
	$shipping_id = $app->getUserState( HIKASHOP_COMPONENT.'.shipping_id');
	$terminal = '<span class="label label-info label-term-info">'.$order->lpexpress.'</span>';	   	  
	$array = array();
	if(!empty($this->shipping_data)) {
        $names = array();
        foreach ($this->shipping_data as $shipping) {
            $names[] = $shipping->shipping_name;
        }
		$text = JText::_('HIKA_NO_TERMINAL_SELECTED');
		if($order->lpexpress == '0') $terminal = '<span class="label label-info-warning">'.$text.'</span>';		
        $array[] = JText::sprintf('HIKASHOP_SHIPPING_METHOD_CHOSEN','<span class="label label-info">' . implode(', ', $names).'</span>');
		if($shipping->shipping_name == 'LPexpress paštomatas') 
		$array[] = JText::sprintf('HIKASHOP_TERMINAL_CHOSEN','<span class="">'.$terminal.'</span>');
    }
	if(!empty($this->payment_data)) {
		$array[]= JText::sprintf('HIKASHOP_PAYMENT_METHOD_CHOSEN','<span class="label label-info">'.$this->payment_data->payment_name.'</span>');
	}
	echo implode('<br/><br/>', $array);
?>

It would display custom field value selected by user. "$order->lpexpress"

After updating to hikashop 3 it doesn't work anymore with old checkout.

What changes i need here?

Many thanks

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 10 months ago #259983

Hi,

Please be more careful with the answer we are giving you.
You're currently asking the same question you already asked ; and we already gave you the answer :
www.hikashop.com/forum/hikashop-3-0-beta...html?start=20#259704

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 1119
  • Thank you received: 114
7 years 10 months ago #260031

Hu,


I dont see where its same question. How to load order custom field value with new checkout to show it in checkout status view?


That topic was about checkout fields view.....

Thanks

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 10 months ago #260032

Hi,

Like I already wrote, in HikaShop 3, all the data required for the checkout is stored in the cart object.
We gave you the code to read the shipping id from the cart object, we gave you the code to get the cart (in a classical view or for the checkout views).
You already have all required elements to perform the modifications and you're free to use some "debug" functions like "var_dump" in order to see the full content of a variable.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 1119
  • Thank you received: 114
7 years 10 months ago #260121

Hi,

My bad...Sorry Jerome

I was reading and thinking about $order :D

Thanks again

The following user(s) said Thank You: Jerome

Please Log in or Create an account to join the conversation.

Time to create page: 0.049 seconds
Powered by Kunena Forum