Jump to content

How to add new CARRIER?


Recommended Posts

Hello,

I have got about 1000 products in Prestashop and I have only one CARRIER (Own delivery). But now I want to add second CARRIER to my shop.

Can you tell me any easy way, how I can add this second CARRIER to all products in my shop?

Thank you.

Link to comment
Share on other sites

Hi, in your shop panel go to Shipping > Carriers > Add new carrier.

 

If you use module like ship to pay make sure it have right configuration.

It is ok, but I dont know, how I can apply new carrier to all of products.

When I create new carrier, this carrier isn´t applied for all products, that I have on the web.

Thank you for reply.

Link to comment
Share on other sites

But, if your products are assigned only selected carriers when the new carrier will not add to such products automatically.

Yes, my products are assigned only selected carriers.

Please, exist any method, how I can add new carrier for all products at one time?

Link to comment
Share on other sites

  • 2 years later...
		$sql = 'SELECT * FROM `' . _DB_PREFIX_ . 'product`';
        $results = Db::getInstance()->executeS($sql);
        foreach ($results as $key => $result) {
            $insert = array(
                'id_product' => (int) $result['id_product'],
                'id_carrier_reference' => (int) 33,
                'id_shop' => (int) 1,
            );
            Db::getInstance()->insert('product_carrier', $insert);
        }

Where 33 is the id of the carrier. 

Careful if you have multishop. 

This code you can enter it in a module at the first lines of getContent() method and click on configure button of the module.

Careful to run it only one time!!!

Careful how to use this code!!! You have been warned :D

 and yes I know it is old post but I run into it from google so another one might end up here

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

  • 11 months later...
  • 2 weeks later...

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...