Jump to content

PHP Warning Order.class 6.4.1


Claudia M
 Share

Recommended Posts

Since I upgraded to 6.4.1 I keep getting this PHP Warning

[26-Nov-2020 13:32:43 America/Louisville] PHP Warning:  implode() [<a href='http://docs.php.net/manual/en/function.implode.php'>function.implode.php</a>]: Invalid arguments passed in /home/claudias/public_html/classes/order.class.php on line 304

Link to comment
Share on other sites

I don't use product options at all. 

Hey while I have you here can you help me with something please.  I created a new database table( I'm probably getting the terminology wrong) in the cubecart_inventory database called excel_name.  I would like that information to automatically show in the special data tab I created for the order_summary database when I sell a product that has that field populated in the admin/product inventory/ general information section. I already have that setup.  Can this be done?

Thanks in advance,

Claudia

Link to comment
Share on other sites

Sure.

When asking to view the Summary of a specific order, the items sold in that order are listed at a couple of places: the Overview tab and the Inventory tab.

When an order is placed, not all of the data from the inventory table is copied over the order_inventory table. However, when viewing the summary, all the data about the item in the order_inventory table is merged with all the data about the item in the inventory table.

So, it should be a simple matter of finding where to add {$product.excel_name} in the tab_contents of your special data tab.

I just posted an issue in the Github about the error.

 

Link to comment
Share on other sites

Thanks for posting the issue in Github

This is what I have in admin/skins/products:

 {if isset($DISPLAY_PRODUCT_FORM)}

   <div id="general" class="tab_content">

      <h3>{$LANG.catalogue.title_information_general}</h3>

      <input type="hidden" name="product_id" value="{$PRODUCT.product_id}">

      <fieldset>

         <legend>{$LANG.catalogue.title_information_basic}</legend>

         <div><label for="">{$LANG.common.status}</label><span><input type="hidden" name="status" id="product_status" value="{$PRODUCT.status}" class="toggle"></span></div>

        <div><label for="name">{$LANG.catalogue.product_name}</label><span><input name="name" id="name" class="textbox required" style="width:600px" type="text" value="{$PRODUCT.name}"></span></div>

        <div><label for="excel_name">Excel Name</label><span><input name="excel_name" id="excel_name" class="textbox" style="width:600px" type="text" value="{$PRODUCT.excel_name}"></span></div>

        <div><label for="product_code">{$LANG.catalogue.product_code}</label><span><input name="product_code" id="product_code" class="textbox" type="text" value="{$PRODUCT.product_code}"></span></div>

               </fieldset>

 

This is what I have in admin/skins/orders:

 <fieldset class="section-right">

                {foreach from=$PRODUCTS item=product}

              <div> <label style="width: 10em;"class="green" for="name"><strong>Product Name</strong></label><span>{$product.name}</span></div>

              {/foreach}

 </fieldset>

 

<fieldset class="section-left" >

              <div> <label style="width: 10em;"class="green" for="excel_name"><strong>Excel Name</strong></label><span>{$product.excel_name}</span></div>

 </fieldset>

 

  <fieldset class="section-right">

   {foreach from=$PRODUCTS item=product}

                    <div><label style="width: 10em;" class="green" for="excel_name"><strong>Excel Name</strong></label><span><input type="text" id="excel_name" name="product[excel_name]" value="{$product.excel_name}" class="textbox"></span></div>

 {/foreach}

 </fieldset>

Link to comment
Share on other sites

In orders.index.php, I do not recognize the "section-left|right" classes. Is this on the Special-Data tab content?

The third <fieldset> isn't giving any product info, such as ID or Name when showing a text entry field having the current excel_name. There needs to be an identifier here if wanting to POST back new excel_name values associated with each respective product:

<input type="text" id="excel_name" name="product[{$product.product_id}][excel_name]" value="{$product.excel_name}" class="textbox">

Back in the orders.index.inc.php code:

foreach ($_POST['product'] as $p_id => $p_e_n) {
  do_something_with( $p_e_n['excel_name'] );
}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...