Post by Cue4cheap » Mon May 12, 2014 6:13 am

I would love it if the listed orders also includes what store it was ordered from. This is needed for muli-store so it is quick to see who needs to take care of orders. (I have different people take care of different stores.)

If anyone knows of a extension or VQMod that is built and can point me there, that would be great!

Mike

www.cuesplus.com


Active Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by uNeverNo » Tue May 13, 2014 1:43 am

This extension should do the job for you:
http://www.opencart.com/index.php?route ... on_id=8698
But it costs as much as $100.

If you feel it is too expensive, I can code a user-friendly extension for you at a lower and reasonable cost for you.

Features of the extension I can think of now is like:
(1)You can set orders of which stores an admin account has access to in the order list page.
(2)If orders of mutiple stores are designated to an admin account, that account will be able to filter orders based on which store the orders are placed in.

PM me if you are interested.

Post in the forum yet no one's willing to help? Contact me for free opencart coding or configuration assistance. Reach me at uneverno1986#gmail.com(replace # with @). But no free extension development request. Sorry about that :( It could take a few days to make a complicated mod.

If you feel I have helped, a donation is optional and appreciated. Image


User avatar
Active Member

Posts

Joined
Sun Sep 23, 2012 10:49 am

Post by Cue4cheap » Tue May 13, 2014 6:01 am

I'm looking for something infinitely more simple....
All I am looking for is just another column that displays what store the order came from. Something like a column between maybe customer and status that says "Store 1" or Store 2, etc.

Mike

www.cuesplus.com


Active Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by uNeverNo » Tue May 13, 2014 1:04 pm

All right. Then it is much easier to code the extension. It must be a vQmod extension that does not modify core files of your site actually.

Post in the forum yet no one's willing to help? Contact me for free opencart coding or configuration assistance. Reach me at uneverno1986#gmail.com(replace # with @). But no free extension development request. Sorry about that :( It could take a few days to make a complicated mod.

If you feel I have helped, a donation is optional and appreciated. Image


User avatar
Active Member

Posts

Joined
Sun Sep 23, 2012 10:49 am

Post by pprmkr » Tue May 13, 2014 3:31 pm

Attachments


User avatar
Active Member

Posts

Joined
Sat Jan 08, 2011 11:05 pm
Location - Netherlands

Post by Cue4cheap » Wed May 14, 2014 11:06 am

Worked like a charm. Awesome.
Thank you,
Mike

www.cuesplus.com


Active Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by kevtheirish » Fri Sep 25, 2015 2:40 am

will this work with 2.0.2?

Active Member

Posts

Joined
Mon Jan 16, 2012 2:58 am

Post by pprmkr » Sun Sep 27, 2015 8:32 pm

No, it does not.

Query and template are different...

User avatar
Active Member

Posts

Joined
Sat Jan 08, 2011 11:05 pm
Location - Netherlands

Post by kevtheirish » Mon Sep 28, 2015 4:30 am

any chance you are working on one for 2.0+ ;)

Active Member

Posts

Joined
Mon Jan 16, 2012 2:58 am

Post by straightlight » Mon Sep 28, 2015 11:33 pm

OC v2.0.3.1

In admin/controller/sale/order.php file,

find:

Code: Select all

$results = $this->model_sale_order->getOrders($filter_data);
add below:

Code: Select all

$this->load->model('setting/store');
find the first instance of:

Code: Select all

$data['orders'][] = array(
add above:

Code: Select all

$store_info = $this->model_setting_store->getStore($result['store_id']);

if ($store_info) {
    $store_name = strip_tags(html_entity_decode(trim($store_info['name']), ENT_QUOTES, 'UTF-8'));
} else {
    $store_name = strip_tags(html_entity_decode(trim($this->config->get('config_name')), ENT_QUOTES, 'UTF-8'));
}
Then, on the same file, find:

Code: Select all

'order_id'      => $result['order_id'],
add below:

Code: Select all

'store'        => $store_name,
Then, find:

Code: Select all

$data['column_customer'] = $this->language->get('column_customer');
add below:

Code: Select all

$data['column_store'] = $this->language->get('column_store');
Then, find:

Code: Select all

$data['sort_customer'] = $this->url->link('sale/order', 'token=' . $this->session->data['token'] . '&sort=customer' . $url, 'SSL');
add below:

Code: Select all

$data['sort_store'] = $this->url->link('sale/order', 'token=' . $this->session->data['token'] . '&sort=store' . $url, 'SSL');
In admin/language/english/sale/order.php file,

Code: Select all

$_['column_customer']          = 'Customer';
add below:

Code: Select all

$_['column_store']               = 'Store';
In admin/model/sale/order.php file,

find:

Code: Select all

o.order_id,
replace with:

Code: Select all

`o`.`store_id`, 
In admin/view/template/sale/order_list.tpl file,

find:

Code: Select all

<td class="text-left"><?php if ($sort == 'customer') { ?>
                    <a href="<?php echo $sort_customer; ?>" class="<?php echo strtolower($order); ?>"><?php echo $column_customer; ?></a>
                    <?php } else { ?>
                    <a href="<?php echo $sort_customer; ?>"><?php echo $column_customer; ?></a>
                    <?php } ?></td>
add below:

Code: Select all

<td class="text-left"><?php if ($sort == 'store') { ?>
                    <a href="<?php echo $sort_store; ?>" class="<?php echo strtolower($order); ?>"><?php echo $column_store; ?></a>
                    <?php } else { ?>
                    <a href="<?php echo $sort_store; ?>"><?php echo $column_store; ?></a>
                    <?php } ?></td>
Then, find:

Code: Select all

<td class="text-left"><?php echo $order['customer']; ?></td>
add below:

Code: Select all

<td class="text-left"><?php echo $order['store']; ?></td>
Then, find:

Code: Select all

<td class="text-center" colspan="8"><?php echo $text_no_results; ?></td>
replace with:

Code: Select all

<td class="text-center" colspan="9"><?php echo $text_no_results; ?></td>
This should resolved the problem,

The most generated errors being found on Opencart forum originates from contributed programming.

Regards,
Straightlight


Guru Member
Online

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by ddpneu » Mon Jun 05, 2017 5:05 pm

Hello,
I don´t need a filter or whole column for store so I applyed just code till:

Code: Select all

'store'        => $store_name,
Unfortunately it shows me only my default store and not the strore where was the order made (in database oc_order column store_name).

What am I doing wrong? I just want to show the data from column store_name to order.

I´m using OC 2.3.0.2.

Thank you for any help.

New member

Posts

Joined
Sat Sep 14, 2013 4:54 am

Post by allenshea » Tue Jun 06, 2017 9:29 am

How to get a short name of this store name?
Our store name has too many letters, can we show it like"Store A" or "Store B"
Thanks!

I know nothing about PHP and SQL, but I still try my best to understand it.


Active Member

Posts

Joined
Mon Dec 14, 2009 10:01 pm

Post by ddpneu » Fri Jun 30, 2017 3:58 pm

Nobody? I would appreciate any help.

New member

Posts

Joined
Sat Sep 14, 2013 4:54 am

Post by dalibor » Tue Aug 08, 2017 7:35 am

Extension for that
https://www.opencart.com/index.php?rout ... n_id=28947

and in product list

https://www.opencart.com/index.php?rout ... n_id=28948
Works for all opencart versions

New member

Posts

Joined
Fri Mar 14, 2014 6:12 am
Who is online

Users browsing this forum: No registered users and 5 guests