Jump to content

Editing order history page !


chahidkhan

Recommended Posts

you have to edit themes/_YOUR_THEME_/history.tpl file + history controller: controllers/front/historycontroller.php

 

it's not as easy as it seems, because you have to run query for products, because by default list of products aren't included to the smarty. What does it mean? It mean that you have to edit controllers. There is no other way to achieve this.

Link to comment
Share on other sites

  • 5 months later...

Hi Guys

seem to have a problem with my customer order history with overlapping address

Think I have narrowed it down to the Order template file

The address overlaps the products

 

not sure what I need to do to fix it

thanks

Mark

 

{if isset($followup)}
<p class="bold">{l s='Click the following link to track the delivery of your order'}</p>
<a href="{$followup|escape:'htmlall':'UTF-8'}">{$followup|escape:'htmlall':'UTF-8'}</a>
{/if}
 
<div class="adresses_bloc clearfix">
<br />
<ul class="address item {if $order->isVirtual()}full_width{/if}">
<li class="address_title">{l s='Billing'}</li>
{foreach from=$inv_adr_fields name=inv_loop item=field_item}
{if $field_item eq "company" && isset($address_invoice->company)}<li class="address_company">{$address_invoice->company|escape:'htmlall':'UTF-8'}</li>
{elseif $field_item eq "address2" && $address_invoice->address2}<li class="address_address2">{$address_invoice->address2|escape:'htmlall':'UTF-8'}</li>
{elseif $field_item eq "phone_mobile" && $address_invoice->phone_mobile}<li class="address_phone_mobile">{$address_invoice->phone_mobile|escape:'htmlall':'UTF-8'}</li>
{else}
{assign var=address_words value=" "|explode:$field_item}
<li>{foreach from=$address_words item=word_item name="word_loop"}{if !$smarty.foreach.word_loop.first} {/if}<span class="address_{$word_item|replace:',':''}">{$invoiceAddressFormatedValues[$word_item|replace:',':'']|escape:'htmlall':'UTF-8'}</span>{/foreach}</li>
{/if}
 
{/foreach}
</ul>
<ul class="address alternate_item" {if $order->isVirtual()}style="display:none;"{/if}>
<li class="address_title">{l s='Delivery'}</li>
{foreach from=$dlv_adr_fields name=dlv_loop item=field_item}
{if $field_item eq "company" && isset($address_delivery->company)}<li class="address_company">{$address_delivery->company|escape:'htmlall':'UTF-8'}</li>
{elseif $field_item eq "address2" && $address_delivery->address2}<li class="address_address2">{$address_delivery->address2|escape:'htmlall':'UTF-8'}</li>
{elseif $field_item eq "phone_mobile" && $address_delivery->phone_mobile}<li class="address_phone_mobile">{$address_delivery->phone_mobile|escape:'htmlall':'UTF-8'}</li>
{else}
{assign var=address_words value=" "|explode:$field_item} 
<li>{foreach from=$address_words item=word_item name="word_loop"}{if !$smarty.foreach.word_loop.first} {/if}<span class="address_{$word_item|replace:',':''}">{$deliveryAddressFormatedValues[$word_item|replace:',':'']|escape:'htmlall':'UTF-8'}</span>{/foreach}</li>
{/if}
{/foreach}
</ul>
</div>
{$HOOK_ORDERDETAILDISPLAYED}
{if !$is_guest}<form action="{$link->getPageLink('order-follow', true)}" method="post">{/if}
<div id="order-detail-content" class="table_block">
<table class="std">
<thead>
<tr>

post-558341-0-56348300-1385066093_thumb.jpg

Edited by vaperus (see edit history)
Link to comment
Share on other sites

  • 1 year later...

you have to edit themes/_YOUR_THEME_/history.tpl file + history controller: controllers/front/historycontroller.php

 

it's not as easy as it seems, because you have to run query for products, because by default list of products aren't included to the smarty. What does it mean? It mean that you have to edit controllers. There is no other way to achieve this.

i want to edit the query where will i get the queries i have to edit. I want to add extra columns to the order history page

Link to comment
Share on other sites

  • 3 months later...
  • 2 months later...

Hello,

 

I want to display product_name in "history.tpl"  ( version:1.6.1)

 

I have put in:

 

HistoryController.php

 

$products = Db::getInstance()->executeS('

        SELECT product_name

        FROM '._DB_PREFIX_.'order_detail WHERE  `id_order`= ');

 

$this->context->smarty->assign(array('products' => $products));

 

history.tpl

 

{foreach from=$products item=product}

{$product.product_name}

 {/foreach}

 

What should I write after “ `id_order`=“ in order to display product_name?

 

Thank you

Edited by adau (see edit history)
Link to comment
Share on other sites

That's not the proper way I think. Modify getCustomerOrders instead, and get the product name there. You can just use STRING_CONCAT on the product_name field in the first query there

 Thank you for your reply. I will follow your suggestion.

Link to comment
Share on other sites

  • 4 months later...

Hello,

 

How can I edit the order history page? I just want to change "Product" to say "Download Your Product" in the order details tab because I sell digital products.

 

Thanks In advance  :)

Link to comment
Share on other sites

  • 4 weeks later...

Hello,

 

Can anyone please help me here?

 

How can I add re-order button to order detail page? I just want to allow a user to reorder individual product from placed order

 

I am using PS-1.6.1.6 with default theme, I don't want to change in core files (tpl or controller)

 

Thanks

Edited by murtaza-vhora (see edit history)
Link to comment
Share on other sites

  • 2 years later...
On 11/22/2013 at 4:36 PM, chahidkhan said:

Hi Guys !

 

Any help to make 10 orders in first page in order history ?

 

Thanks

hello, all.

did you had some sucess doing that? 

i have a problem with a costumer long history and i think it would help to limit the last 12 or so orders in history.tpl

 

any help is welcome, thanks in advance

Link to comment
Share on other sites

  • 8 months later...

anyone have any suggestions for fixing the totals in the order history? I've managed to fix the totals (subtotal+tax) on the order confirmation page etc, but I havent' been able to get the order history in the front end to change....mainly because I'm not exactly sure where to change the coding. Prestashop 1.7.6.1

Scott

oDPgQJ.jpg

Edited by GJ Tonewood LLC (see edit history)
Link to comment
Share on other sites

  • 6 months later...
  • 3 months later...

Hello,

 

I would like a piece of information: I have a problem, I should order my product catalog in descending order according to the code name "reference". The problem is that the products, in addition to a letter, also have the number and I would like the number to be in ascending order.

 

Example

I have in my catalog products that start from reference code N111 and go-to reference code P331. I would like the products starting with P to be the first to be displayed in the various categories of the FO. So I would just put the display of the products in order to show the order by "product reference" in the descending method. Here the problem arises. Because I would like the products for P to be shown from the lowest, that is from P101 so to have

P101

####

####

P331

N###

Etc

And not as it comes out now which is

P331

####

####

P101

N###

 

I tried to force it by doing the manual reordering through position in the product catalog but, another problem is that these positions that I forced him, are canceled every time the synchronization is done by management through a web service.

Can you help me? Is there any way, programming, or module to get it back? I am already late with this client so it is quite urgent.

 

Thank you,

Best regards. 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...