Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8539143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T11:17:36+00:00 2026-06-11T11:17:36+00:00

Code is like this $.get( //’index.php?route=sale/order/infoforhome&token=<?php echo $token; ?>’, ‘index.php?route=common/home/orderinfo&token=<?php echo $token; ?>’, {

  • 0

Code is like this

$.get(
            //'index.php?route=sale/order/infoforhome&token=<?php echo $token; ?>', 
            'index.php?route=common/home/orderinfo&token=<?php echo $token; ?>', 
            { 'order_id' : id }, 
            function(data){
                if(data)
                {
                        html =  '<div class="vtabs">' + 
                                '<?php if ($this->config->get(\'sales_order_detail\')) { ?>' +
                                '<a href="#tab-order"><?php echo $tab_order; ?></a>'+ 
                                '<?php } ?>' + 
                                '<?php if ($this->config->get(\'sales_payment_detail\')) { ?>' + 
                                '<a href="#tab-payment"><?php echo $tab_payment; ?></a>' + 
                                '<?php } ?>' + 
                                '<?php if ($shipping_method) { ?>' +
                                '<?php if ($this->config->get(\'sales_shipping_detail\')) { ?>' +
                                '<a href="#tab-shipping"><?php echo $tab_shipping; ?></a>' + 
                                '<?php } ?>' +
                                '<?php } ?>' +
                                '<?php if ($this->config->get(\'sales_product\')) { ?>' + 
                                    '<a href="#tab-product">'+
                                        '<?php echo $tab_product; ?>'+
                                    '</a>'+
                                '<?php } ?>'+
                                '<?php if ($this->config->get(\'sales_order_history\')) { ?>' + 
                                    '<a href="#tab-history">' + 
                                        '<?php echo $tab_order_history; ?>' + 
                                    '</a>' + 
                                '<?php } ?>' + 
                                '</div>' +
                                '<?php if ($this->config->get(\'sales_order_detail\')) { ?>' +
                                '<div id="tab-order" class="vtabs-content">' +
                                '<table class="form">' +
                                    '<tr>' +
                                        '<td><?php echo $text_order_id; ?></td>' +
                                        '<td>#' + data['order_id'] + '</td>' +
                                    '</tr>' +
                                '<tr>' +
                                    '<td><?php echo $text_invoice_no; ?></td>' +
                                    '<td><?php if (' + data['invoice_no'] + '){ ?>' +
                                        data['invoice_no'] +
                                        '<?php } else { ?>' +
                                        '<span id="invoice"><b>[</b> <a id="invoice-generate"><?php echo $text_generate; ?></a> <b>]</b></span>' +
                                    '<?php } ?></td>'+
                                '</tr>'+
                                '<tr>'+
                                    '<td><?php echo $text_store_name; ?></td>' +
                                    '<td>'+ data['store_name'] +'</td>' +
                                '</tr>' +
                                '<tr>' +
                                    '<td><?php echo $text_store_url; ?></td>' +
                                    '<td><a onclick="window.open(\''+ data[store_url] +'\');"><u>' + data['store_url'] + '</u></a></td>' +
                                '</tr>' +
                                '<?php if (' + data['customer'] + ') { ?>' +
                                '<tr>' +
                                    '<td><?php echo $text_customer; ?></td>' +
                                    '<td><a href="' + data['customer'] + '">' + data['firstname'] + ' ' + data['lastname'] + '</a></td>' +
                                '</tr>' +
                                '<?php } else { ?>' +
                                '<tr>' +
                                    '<td><?php echo $text_customer; ?></td>' +
                                    '<td>' + data['firstname'] + ' ' + data['lastname'] + '</td>' +
                                '</tr>' +
                                '<?php } ?>' +
                                '<?php if (' + data['customer_group'] + ') { ?>' +
                                '<tr>' +
                                    '<td><?php echo $text_customer_group; ?></td>' +
                                    '<td>' + data['customer_group'] + '</td>' +
                                '</tr>' +
                                '<?php } ?>' +
                                '<tr>' +
                                    '<td><?php echo $text_ip; ?></td>' +
                                    '<td>'+ data['ip']+'</td>' +
                                '</tr>' +
                                '<tr>' +
                                    '<td><?php echo $text_email; ?></td>' +
                                    '<td>' + data['email'] + '</td>' +
                                '</tr>' +
                                '<tr>' +
                                    '<td><?php echo $text_telephone; ?></td>' +
                                    '<td>' + data['telephone'] + '</td>' +
                                '</tr>'+
                                '<tr>' +
                                    '<td><?php echo $text_mobilephone; ?></td>' +
                                    '<td>' + data['mobilenumber'] + '</td>' +
                                '</tr>'+
                                '<?php if ('+data['fax']+') { ?>' +
                                '<tr>' +
                                    '<td><?php echo $text_fax; ?></td>' +
                                    '<td>' + data['fax'] + '</td>' +
                                '</tr>' +
                                '<?php } ?>' +
                                '<tr>' +
                                    '<td><?php echo $text_total; ?></td>' +
                                    '<td>' + data['total'] +
                                    '<?php if (' + data['credit'] + '&&' + data['customer'] + ') { ?>' +
                                    '<?php if (!' + data['credit_total'] + ') { ?>' +
                                    '<span id="credit"><b>[</b> <a id="credit-add"><?php echo $text_credit_add; ?></a> <b>]</b></span>' +
                                    '<?php } else { ?>' +
                                    '<span id="credit"><b>[</b> <a id="credit-remove"><?php echo $text_credit_remove; ?></a> <b>]</b></span>' +
                                    '<?php } ?>' +
                                    '<?php } ?></td>' +
                                '</tr>' +

                                '<?php if ($order_status) { ?>' +
                                '<tr>' +
                                    '<td><?php echo $text_order_status; ?></td>'+
                                    '<td id="order-status">' + data['order_status'] + '</td>'+
                                '</tr>'+
                                '<?php } ?>'+
                                '<?php if (' + data['comment'] + ') { ?>'+
                                '<tr>'+
                                    '<td><?php echo $text_comment; ?></td>'+
                                    '<td>' + data['comment'] + '</td>'+
                                '</tr>'+
                                '<?php } ?>'+
                                '<?php if (' + data['affiliate'] + ') { ?>'+
                                '<tr>'+
                                    '<td><?php echo $text_affiliate; ?></td>'+
                                    '<td><a href="' + data['affiliate'] + '">' + data['affiliate_firstname'] + ' ' + data['affiliate_lastname'] + '</a></td>'+
                                '</tr>'+
                                '<tr>'+
                                    '<td><?php echo $text_commission; ?></td>'+
                                    '<td>' + data['commission'] +
                                    '<?php if (!' + data['commission_total'] + ') { ?>'+
                                    '<span id="commission"><b>[</b> <a id="commission-add"><?php echo $text_commission_add; ?></a> <b>]</b></span>'+
                                    '<?php } else { ?>'+
                                    '<span id="commission"><b>[</b> <a id="commission-remove"><?php echo $text_commission_remove; ?></a> <b>]</b></span>'+
                                    '<?php } ?></td>'+
                                    '</tr>'+
                                    '<?php } ?>'+
                                    '<tr>'+
                                      '<td><?php echo $text_date_added; ?></td>'+
                                      '<td>' + data['date_added'] + '</td>'+
                                    '</tr>'+
                                    '<tr>'+
                                      '<td><?php echo $text_date_modified; ?></td>'+
                                      '<td>' +data['date_modified']+'</td>'+
                                    '</tr>'+
                                  '</table>'+
                                '</div>'+
                                '<?php } ?>'+
                                '<?php if ($this->config->get(\'sales_payment_detail\')) { ?>'+
                                '<div id="tab-payment" class="vtabs-content">'+
                                '<table class="form">'+
                                '<tr>'+
                                    '<td><?php echo $text_firstname; ?></td>'+
                                    '<td>'+ data['payment_firstname'] +'</td>'+
                                '</tr>'+
                                '<tr>'+
                                  '<td><?php echo $text_lastname; ?></td>'+
                                  '<td>' + data['payment_lastname'] + '</td>'+
                                '</tr>'+
                                '<?php if (' + data['payment_company'] +') { ?>'+
                                '<tr>'+
                                  '<td><?php echo $text_company; ?></td>'+
                                  '<td>' + data['payment_company']+ '</td>'+
                                '</tr>'+
                                '<?php } ?>'+
                                '<tr>'+
                                  '<td><?php echo $text_address_1; ?></td>'+
                                  '<td>' + data['payment_address_1'] + '</td>'+
                                '</tr>'+
                                '<?php if (' + data['payment_address_2'] + ') { ?>'+
                                '<tr>'+
                                  '<td><?php echo $text_address_2; ?></td>'+
                                  '<td>' +data['payment_address_2']+'</td>'+
                                '</tr>'+
                                '<?php } ?>'+
                                '<tr>'+
                                  '<td><?php echo $text_city; ?></td>'+
                                  '<td>' + data['payment_city'] + '</td>'+
                                '</tr>'+
                                '<?php if (' + data['payment_postcode'] + ') { ?>'+
                                '<tr>'+
                                  '<td><?php echo $text_postcode; ?></td>'+
                                  '<td>' + data['payment_postcode'] + '</td>'+
                                '</tr>'+
                                '<?php } ?>'+
                                '<tr>'+
                                  '<td><?php echo $text_zone; ?></td>'+
                                  '<td>' + data['payment_zone'] + '</td>'+
                                '</tr>'+
                                '<?php if (' + data['payment_zone_code'] + ') { ?>'+
                                '<tr>'+
                                  '<td><?php echo $text_zone_code; ?></td>'+
                                  '<td>' + data['payment_zone_code'] + '</td>'+
                                '</tr>'+
                                '<?php } ?>'+
                                '<tr>'+
                                  '<td><?php echo $text_country; ?></td>'+
                                  '<td>' + data['payment_country'] + '</td>'+
                                '</tr>'+
                                '<tr>'+
                                  '<td><?php echo $text_payment_method; ?></td>'+
                                  '<td>' + data['payment_method'] + '</td>'+
                                '</tr>'+
                              '</table>'+
                            '</div>'+
                            '<?php } ?>'+
                            '<?php if ($this->config->get(\'sales_shipping_detail\')) { ?>'+
                            '<?php if ($shipping_method) { ?>'+
                            '<div id="tab-shipping" class="vtabs-content">'+
                            '<table class="form">'+
                                '<tr>'+
                                    '<td><?php echo $text_firstname; ?></td>'+
                                    '<td>' + data['shipping_firstname'] + '</td>'+
                                '</tr>'+
                            '<tr>'+
                              '<td><?php echo $text_lastname; ?></td>'+
                              '<td>' + data['shipping_lastname'] + '</td>'+
                            '</tr>'+
                            '<?php if (' + data['shipping_company']+ ') { ?>'+
                            '<tr>'+
                              '<td><?php echo $text_company; ?></td>'+
                              '<td>' + data['shipping_company']+'</td>'+
                            '</tr>'+
                            '<?php } ?>'+
                            '<tr>'+
                              '<td><?php echo $text_address_1; ?></td>'+
                              '<td>' + data['shipping_address_1'] + '</td>'+
                            '</tr>'+
                            '<?php if (' + data['shipping_address_2'] + ') { ?>'+
                            '<tr>'+
                              '<td><?php echo $text_address_2; ?></td>'+
                              '<td>' + data['shipping_address_2'] + '</td>'+
                            '</tr>'+
                            '<?php } ?>'+
                            '<tr>'+
                              '<td><?php echo $text_city; ?></td>'+
                              '<td>' + data['shipping_city'] + '</td>'+
                            '</tr>'+
                            '<?php if (' + data['shipping_postcode'] + ') { ?>'+
                            '<tr>'+
                              '<td><?php echo $text_postcode; ?></td>'+
                              '<td>' + data['shipping_postcode'] + '</td>'+
                            '</tr>'+
                            '<?php } ?>'+
                            '<tr>'+
                              '<td><?php echo $text_zone; ?></td>'+
                              '<td>' + data['shipping_zone'] + '</td>'+
                            '</tr>'+
                            '<?php if (' + data['shipping_zone_code'] + ') { ?>'+
                            '<tr>'+
                              '<td><?php echo $text_zone_code; ?></td>'+
                              '<td>' + data['shipping_zone_code'] + '</td>'+
                            '</tr>'+
                            '<?php } ?>'+
                            '<tr>'+
                              '<td><?php echo $text_country; ?></td>'+
                              '<td>' + data['shipping_country'] + '</td>'+
                            '</tr>'+
                            '<?php if (' + data['shipping_method']+') { ?>'+
                            '<tr>'+
                              '<td><?php echo $text_shipping_method; ?></td>'+
                              '<td>' + data['shipping_method'] + '</td>'+
                            '</tr>'+
                            '<?php } ?>'+
                          '</table>'+
                        '</div>'+
                        '<?php } ?>'+
                            '<?php } ?>'+
                            '<?php if ($this->config->get(\'sales_product\')) { ?>'+
                        '<div id="tab-product" class="vtabs-content">'+
                          '<table id="product" class="list">'+
                            '<thead>'+
                              '<tr>'+
                                '<td class="left"><?php echo $column_product; ?></td>'+
                                '<td class="left"><?php echo $column_model; ?></td>'+
                                '<td class="right"><?php echo $column_quantity; ?></td>'+
                                '<td class="right"><?php echo $column_price; ?></td>'+
                                '<td class="right"><?php echo $column_total; ?></td>'+
                              '</tr>'+
                            '</thead>'+
                            '<?php foreach (' + data['products'] = ' as $product) { ?>'+
                            '<tbody id="product-row<?php echo $product[\'order_product_id\']; ?>">'+
                              '<tr>'+
                                '<td class="left"><?php if ($product[\'product_id\']) { ?>'+
                                  '<a href="<?php echo $product[\'href\']; ?>"><?php echo $product[\'name\']; ?></a>'+
                                  '<?php } else { ?>'+
                                  '<?php echo $product[\'name\']; ?>'+
                                  '<?php } ?>'+
                                  '<?php foreach ($product[\'option\'] as $option) { ?>'+
                                  '<br />'+
                                  '<?php if ($option[\'type\'] != \'file\') { ?>'+
                                  '&nbsp;<small> - <?php echo $option[\'name\']; ?>: <?php echo $option[\'value\']; ?></small>'+
                                  '<?php } else { ?>'+
                                  '&nbsp;<small> - <?php echo $option[\'name\']; ?>: <a href="<?php echo $option[\'href\']; ?>"><?php echo $option[\'value\']; ?></a></small>'+
                                  '<?php } ?>'+
                                  '<?php } ?></td>'+
                                '<td class="left"><?php echo $product[\'model\']; ?></td>'+
                                '<td class="right"><?php echo $product[\'quantity\']; ?></td>'+
                                '<td class="right"><?php echo $product[\'price\']; ?></td>'+
                                '<td class="right"><?php echo $product[\'total\']; ?></td>'+
                              '</tr>'+
                            '</tbody>'+
                            '<?php } ?>'+
                            '<tbody id="totals">'+
                            '<tr>'+
                                '<td colspan="4" class="right"><?php echo $text_subtotal; ?> :</td>'+
                                '<td class="right">' + data['subtotal'] + '</td>'+
                            '</tr>'+
                            '<?php if (' + data['shipping_weight'] + ') { ?>'+
                            '<tr>'+
                                '<td colspan="4" class="right">' + data['shipping_weight'] + ' :</td>'+
                                '<td class="right">' + data['shipping_cost'] + '</td>'+
                            '</tr>'+
                            '<?php } ?>'+
                            '<tr>'+
                                '<td colspan="4" class="right"><?php echo $text_total; ?> :</td>'+
                                '<td class="right">' + data['totals'] + '</td>'+
                            '</tr>'+
                            '</tbody>'+
                          '</table>'+
                          '<?php if (' +data['downloads'] + ') { ?>'+
                          '<h3><?php echo $text_download; ?></h3>'+
                          '<table class="list">'+
                            '<thead>'+
                              '<tr>'+
                                '<td class="left"><b><?php echo $column_download; ?></b></td>'+
                                '<td class="left"><b><?php echo $column_filename; ?></b></td>'+
                                '<td class="right"><b><?php echo $column_remaining; ?></b></td>'+
                              '</tr>'+
                            '</thead>'+
                            '<tbody>'+
                              '<?php foreach (' + data['downloads'] + ' as $download) { ?>'+
                              '<tr>'+
                                '<td class="left"><?php echo $download[\'name\']; ?></td>'+
                                '<td class="left"><?php echo $download[\'filename\']; ?></td>'+
                                '<td class="right"><?php echo $download[\'remaining\']; ?></td>'+
                              '</tr>'+
                              '<?php } ?>'+
                            '</tbody>'+
                          '</table>'+
                          '<?php } ?>'+
                        '</div>'+
                            '<?php } ?>'+
                            '<?php if ($this->config->get(\'sales_order_history\')) { ?>'+
                        '<div id="tab-history" class="vtabs-content">'+
                          '<div id="history"></div>'+
                          '<table class="form">'+
                            ' <?php if ($this->config->get(\'sales_order_history_update\')) { ?>' +
                            '<tr>'+
                              '<td><?php echo $entry_order_status; ?></td>'+
                              '<td><select name="order_status_id">'+
                                  '<?php foreach (' + data['order_statuses'] + '  as $order_statuses) { ?>' +
                                  '<?php if ($order_statuses[\'order_status_id\'] == $order_status_id) { ?>' +
                                  '<option value="<?php echo $order_statuses[\'order_status_id\']; ?>" selected="selected"><?php echo $order_statuses[\'name\']; ?></option>'+
                                  '<?php } else { ?>' +
                                  '<option value="<?php echo $order_statuses[\'order_status_id\']; ?>"><?php echo $order_statuses[\'name\']; ?></option>' +
                                  '<?php } ?>'+
                                  '<?php } ?>'+
                                '</select></td>'+
                            '</tr>'+
                                '<tr>'+
                              '<td><?php echo $entry_notify; ?></td>'+
                              '<td><input type="checkbox" name="notify" value="1" /></td>'+
                            '</tr>'+
                            '<tr>'+
                              '<td><?php echo $entry_comment; ?></td>'+
                              '<td><textarea name="comment" cols="40" rows="8" style="width: 99%"></textarea>'+
                                '<div style="margin-top: 10px; text-align: right;"><a onclick="history();" id="button-history" class="button"><?php echo $button_add_history; ?></a></div></td>'+
                            '</tr>'+
                            '<?php } ?>' +
                        '</table>' +
                        '</div>' +
                        '<?php } ?>'; //Getting Error on this line on Netbeans IDE

                      $('div.latest_detail div#oder_detail').html(html);
                }
                else
                {
                    $('#order_detail').html('Sorry No Details exists for this order in the database');
                }
            }, 'json');

I am modifying open-cart. Sorry if I am doing it wrong. I am tired of finding the error but not able to resolve it. Error that are getting after running this on browser is

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, 
expecting T_STRING in 
C:\Server\Zend\Apache2\htdocs\oc\admin\view\template\common\home.tpl on line 522

and on Netbeans IDE it’s showing me suggestion that Invalid assignment left-hand side on last line of html before

$('div.latest_detail div#oder_detail').html(html);

Please help.?? Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T11:17:37+00:00Added an answer on June 11, 2026 at 11:17 am

    Your biggest problem, as others have pointed out, is that you’re trying to use PHP if-then logic inside of JavaScript code. This won’t work, as PHP is run server-side and JavaScript is run client-side, so they can’t possibly interact with each other.

    Even without this, though, it’s cumbersome and unnecessary to write lengthy blocks of HTML code in JavaScript. A far better approach is to write that code in the HTML and hide it using CSS with display:none, then use jQuery to show() it as needed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some code like this: var mySelect = document.getElementById(mySelect); mySelect.innerHTML = <option>Loading...</option>; $.get(ajaxPage.php,
In code like this, get '/posts.?:format?' do # ... end How can I get
If I have a code like this: $file = basename($filename); How do I get
I have JSF code like: <h:inputText id=from value=#{fromToMBean.fromName}/> I would like to get this
My code currently looks like this: private Foo myFoo; public Foo CurrentFoo { get
I'm using code like this to get text from off the Clipboard. Dim DataObj
I’d like to match any GET request in Mojolicious::Lite. The code looks like this:
Suppose you have a simple block of code like this: app.get('/', function(req, res){ res.send('Hello
I would like to have a route like this get users/sms_confirmation/:sms_confirmation_code => users#sms_confirmation bind
in my public_html folder, I have some code like this: echo file_get_contents('files/123.txt'); Users can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.