Jump to content

Resolved - Options Listed Separately on Order


Recommended Posts

The edit has no choice but to work. The break tag is in the HTML and the browser will honor it.

One thing that was introduced in CC4 and greatly expanded upon in CC5 is the creation of a cached version of a previously rendered skin page. In the admin screen, under maintenance (I think), is a function to clear the skin cache. Do that and see if the edits to orders.index.php finally appear.

Link to comment
Share on other sites

Allow me suggest Notepad++, a free programmer's editor, to do your file editing.

As I suggested above, about line 43 is where you need to look for the art of the statement I suggest you change. Correct me if I am wrong, but since you are expressing some difficulty in finding where this edit should take place, I'm thinking you are using an editor that does not show line numbers.

Link to comment
Share on other sites

Im using dreamweaver CS5. The code in orders.index.php is as follows which is different to what you suggested and around line 140. I have tried different variants but nothing seems to work. Help in what to change in this file would be very much appreciated.


{foreach from=$PRODUCTS item=product}

  <div id="item">

  {$product.quantity} x {$product.name} - {$product.product_code} ({$product.line_formatted}) {if $product.digital}<a href="{$VAL_SELF}&amp;reset_id={$product.id}" />[{$LANG.orders.reset_download_link}]</a>{/if}<span>{$product.price_total_formatted}</span>

  {if $product.options}

   <br />{$product.options}

   {/if}

  </div>

  {/foreach}







Link to comment
Share on other sites

Maybe this is the section that needs the break:


{if isset($ORDER_LIST)}

   <tfoot>

  <tr>

    <td><img src="{$SKIN_VARS.admin_folder}/skins/{$SKIN_VARS.skin_folder}/images/select_all.gif" alt="" /></td>

    <td><a href="#" class="check-all" rel="all-orders">{$LANG.form.check_uncheck}</a></td>

    <td colspan="6">

    {$LANG.orders.with_selected}:

   <select name="multi-status" class="textbox">

	 <option value="">{$LANG.orders.option_status_no_change}</option>

	 <optgroup label="{$LANG.orders.change_order_status}">

	 {foreach from=$LIST_ORDER_STATUS item=status}<option value="{$status.id}"{$status.selected}>{$status.string}</option>{/foreach}

	 </optgroup>

	  </select>

	  {$LANG.common.then}

	  <select name="multi-action" class="textbox">

	 <option value="">{$LANG.orders.option_nothing}</option>

	 <option value="print">{$LANG.orders.option_print}</option>

	 <option value="delete" style="color: red;">{$LANG.orders.option_delete}</option>

	  </select>

   <input type="submit" value="{$LANG.common.go}" name="go"/>

    </td>

  </tr>

   </tfoot>

   {/if}

Link to comment
Share on other sites

Let's be clear about what file we are editing:

For CC510, adminskinsdefaulttemplatesorders.print.php

This is the file specifically mentioned in post #1 of this conversation and is directly relevant to the subject of this conversation.

My copy of this file, being in the skin...templates folder, is a full HTML document and is what is used by CubeCart's administration side of the store to print a receipt (shipping label) of an order, and is usually a document the customer eventually receives.

I see that later in this conversation, the file of interest has changed to orders.index.php which displays in a list some or all orders, and displays an overview/summary of any particular order for the admin's benefit.

(I applaud you for using CS5, as CS4 was almost good enough, but CS3 and earlier was completely unsuitable for editing partial HTML documents with embedded templating code.)

If you are wishing to split each selected option for the product ordered to a new line, then there needs to be a small edit in the controller file, as well as the view file - the HTML template file - in the model-view-controller (MVC) scheme, order.index.php.

adminsourcesorders.index.inc.php, about line 236. Find this part:

implode(' ', unserialize($product['product_options']));


We will leave it as an array:


unserialize($product['product_options']);




Then, in order.index.php, find near line 145:


<br />{$product.options}


We need to have the template to break apart this array:


<br />{foreach from=$product.options item=option}{$option}<br />{/foreach}

Clear the skin cache (just to make sure) and watch for the inevitable case where something else that relies on orders.index.inc.php to blow up spectacularly.

Link to comment
Share on other sites

Thanks, that all works now on all files. Sorry if I was not clear, maybe I should have changed the post title.

When you have more than a few options I think it is important for both customers and admin to be able to read the order easily. I do think that this is something that should be done as standard on cube cart. I will pass it across to them

Many thanks

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.

×
×
  • Create New...