Jump to content

Edit History

faysal f

faysal f

oreach ($order_details as $key_order => $val_order) {
            $info = new ApcarrentalOrder();
            $info = $info->getOrderByIdProduct($val_order['id_order'], $val_order['product_id']);
            $info = $info[0];
            $order_details[$key_order]['date_from'] = $info['date_from'];
            $order_details[$key_order]['date_to'] = $info['date_to'];
            $service = explode(',', $info['service']);
            if (!empty($service)) {
                foreach ($service as $key_s => $val_s) {
                    $service[$key_s] = new ApcarrentalService($val_s, $id_lang);
                }
            }
            $order_details[$key_order]['service'] = $service;
        }

        $data = array(
            'baseurl' => Context::getContext()->shop->getBaseURL(true, true),
            'order' => $this->order,
            'order_invoice' => $this->order_invoice,
            'order_details' => $order_details,
            'carrier' => $carrier,
            'cart_rules' => $cart_rules,
            'delivery_address' => $formatted_delivery_address,
            'invoice_address' => $formatted_invoice_address,
            'addresses' => array('invoice' => $invoice_address, 'delivery' => $delivery_address),
            'tax_excluded_display' => $tax_excluded_display,
            'display_product_images' => $display_product_images,
            'layout' => $layout,
            'tax_tab' => $this->getTaxTabContent(),
            'customer' => $customer,
            'footer' => $footer,
            'ps_price_compute_precision' => _PS_PRICE_COMPUTE_PRECISION_,
            'round_type' => $round_type,
            'legal_free_text' => $legal_free_text,
        );
        if (Tools::getValue('debug')) {
            die(Tools::jsonEncode($data));
        }
        $this->smarty->assign($data);
       

 

========in tpl file I call variables date_from and date_to and dosen't work ============

{foreach $order_details as $key_order => $val_order}
        {cycle values=["color_line_even", "color_line_odd"] assign=bgcolor_class}
        <tr class="product {$bgcolor_class}">                  
            <td class="product center">
                {$key_order.val_order.date_from}
            </td>
            <td class="product center">
                {$key_order.val_order.date_to}
            </td>

        </tr>
    {/foreach}

=============

faysal f

faysal f

oreach ($order_details as $key_order => $val_order) {
            $info = new ApcarrentalOrder();
            $info = $info->getOrderByIdProduct($val_order['id_order'], $val_order['product_id']);
            $info = $info[0];
            $order_details[$key_order]['date_from'] = $info['date_from'];
            $order_details[$key_order]['date_to'] = $info['date_to'];
            $service = explode(',', $info['service']);
            if (!empty($service)) {
                foreach ($service as $key_s => $val_s) {
                    $service[$key_s] = new ApcarrentalService($val_s, $id_lang);
                }
            }
            $order_details[$key_order]['service'] = $service;
        }

        $data = array(
            'baseurl' => Context::getContext()->shop->getBaseURL(true, true),
            'order' => $this->order,
            'order_invoice' => $this->order_invoice,
            'order_details' => $order_details,
            'carrier' => $carrier,
            'cart_rules' => $cart_rules,
            'delivery_address' => $formatted_delivery_address,
            'invoice_address' => $formatted_invoice_address,
            'addresses' => array('invoice' => $invoice_address, 'delivery' => $delivery_address),
            'tax_excluded_display' => $tax_excluded_display,
            'display_product_images' => $display_product_images,
            'layout' => $layout,
            'tax_tab' => $this->getTaxTabContent(),
            'customer' => $customer,
            'footer' => $footer,
            'ps_price_compute_precision' => _PS_PRICE_COMPUTE_PRECISION_,
            'round_type' => $round_type,
            'legal_free_text' => $legal_free_text,
        );
        if (Tools::getValue('debug')) {
            die(Tools::jsonEncode($data));
        }
        $this->smarty->assign($data);
       

 

========in tpl file I call variables date_from and date_to and dosen't work ============

{foreach $order_details as $key_order => $val_order}
        {cycle values=["color_line_even", "color_line_odd"] assign=bgcolor_class}
        <tr class="product {$bgcolor_class}">                  
            <td class="product center">
                {$key_order.date_from}
            </td>
            <td class="product center">
                {$key_order.date_from}
            </td>

        </tr>
    {/foreach}

=============

×
×
  • Create New...