Vendor Selector In Products Page

Hello Everyone,

In the products page, when assigning the product to a vendor there is a selector dropdown which displays all vendors and allows you to select the vendor that this product is associated to. If i want to stop some vendors from showing up in this dropdown list, how can i achieve this ? I'm sure its a database query which i can just add the condition, basically i want vendors assigned to a certain vendor plan not to show up there.

Please assist

Thanks,

Kyle.

app/controllers/common/companies.post.php

use the get_companies_list hook to alter sql request

Dear eComLabs,

Thanks, it worked!

How about the shipping carriers selector & order status selector ? Where can i find these ?

Thanks!

Kyle

Dear eComLabs,

Thanks, it worked!

How about the shipping carriers selector & order status selector ? Where can i find these ?

Thanks!

Kyle

What page do you mean?

Hi ecComLabs,

When you view the order details through backend > orders > view orders > order #1010 for example.

Thanks,

Ahmad.

Can anyone please help ? i really need to implement this.

Carriers:

app/controllers/backend/orders.php

Tygh::$app['view']->assign('carriers', Shippings::getCarriers());

Statuses:

design/backend/templates/views/orders/details.tpl

{assign var="order_statuses" value=$smarty.const.STATUSES_ORDER|fn_get_statuses:$statuses:$get_additional_statuses:true}

Hi eComLabs,

For carriers, i was able to find the line however can you help tell me what to change exactly here ? I don't see any DB queries where i can just alter the conditions.

For order statuses, i was able to locate the below code only in the details.tpl file. Can you please tell me what to change here whether i want a certain status not to show up ? I was hoping to see a db query and just modifying the condition.

 {$statuses = []}
                            {$order_statuses=$smarty.const.STATUSES_ORDER|fn_get_statuses:$statuses:$get_additional_statuses:true}

1. Check the getCarriers function here

app/Tygh/Shippings/Shippings.php

2. Check the fn_get_statuses function here

app/functions/fn.common.php

Hi eComLabs,

Great the carriers code worked! but unfotunately for order stauses im still seeing the option to change the order status of orders to the ones i tried to hide. Can you help please?

Thanks,

Kyle.

Hi eComLabs,

Great the carriers code worked! but unfotunately for order stauses im still seeing the option to change the order status of orders to the ones i tried to hide. Can you help please?

Thanks,

Kyle.

Do you want to completely remove status changer from order details page?

Hi eComLabs,

No i want to keep it since i will change the order statuses however the selector which contains the list of all order statuses, i want to hide some statuses like "Awaiting Call" and "Backordered" so that admins will not be able to assign these statuses whatsoever to the order.

Thanks,

kyle.

You can use hooks in the fn_get_statuses function in this case

Can you please assist me where to change the statuses being shown ? I wanna hide Backordered and Awaiting Call statuses from showing up in the list of statuses when changing order status.

Use get_statuses_post hook to alter the $statuses array

Unfortunately im not able to get it done :(

Unfortunately im not able to get it done :(

Check documentation for developers to find how to use hooks