Post by NathanDC » Mon Jan 04, 2016 12:49 am

I have found a bug in multistore setup.

When you manualy add a product in the admin order system that are listed under the other stores (not the main store), you can't add the product.

It say the product is added, but nothing happens.

Reproduce:

1. Manualy add a order
2. Assign a customer, shipping address, ...
3. Add a product that is only assigned to an other store and not the main. --> Here the product don't load

Are there more people having this problem or maybe a solution for this?

Regards,

Nathan

Newbie

Posts

Joined
Mon Jan 04, 2016 12:37 am

Post by NathanDC » Tue Mar 01, 2016 11:30 pm

Still having this problem, is there a solution for this?

Regards,
Nathan

Newbie

Posts

Joined
Mon Jan 04, 2016 12:37 am

Post by ADD Creative » Wed Mar 02, 2016 7:33 am

This is the line that checks if the product can be added.
https://github.com/opencart/opencart/bl ... al.php#L80

Which calls get getProduct.
https://github.com/opencart/opencart/bl ... ct.php#L14

Which has a long SQL query with the following at the end.

Code: Select all

 AND p2s.store_id = '" . (int)$this->config->get('config_store_id') . "'
This only gets products for the default store. You can't just remove it as it would then allow all products from all stores for the customers as well as the admin.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by NathanDC » Wed Mar 09, 2016 12:34 am

Thank you for your reply.

So when I delete the following:

AND p2s.store_id = '" . (int)$this->config->get('config_store_id') . "'

it works indeed and I can add all the products from all the stores in the admin order.

I don't understand all the products for customers as the admin.

The situation is that all the stores may be accessed by all the customers and there are no extra customer groups except default.

It is no problem if products from the other stores are together on the manual order from other stores.

I tested it and everything works, but I can't see where there could be a problem in this setup ofcourse.

Should this be ok then or not?

Sorry for my english.

Regards,
Jonathan

Newbie

Posts

Joined
Mon Jan 04, 2016 12:37 am

Post by ADD Creative » Wed Mar 09, 2016 6:58 pm

An example would be that a customer could view and order a product in a different store. They would need to know the product_id. Say you had a product with the id of 30. You could view this in any store by going to index.php?route=product/product&product_id=30.

May not be an issue to you, but if you change what products are in which sores often, the product pages may get indexed by search engines for another one of your stores.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 47 guests