Post by lukeketchum1 » Wed Jul 11, 2018 5:20 pm

Hey guys,

I am using OpenCart 3 and have been adding products to my store for a few weeks.

I added about 200 products which are digital, and do not require shipping, in all my wisdom I didn't change it from 'yes' to 'no' on requires shipping bit.

Is there a way of doing this in bulk to save me a) some time in the future b) some rsi

Any help appreciated, thank you

Luke

New member

Posts

Joined
Tue Jan 23, 2018 12:30 am

Post by kestas » Wed Jul 11, 2018 5:45 pm

Hi you simply can make it in your phpmyadmin. Select and open your database, click SQL tab and paste this code:

Code: Select all

UPDATE oc_product
    SET shipping = 0
and click GO

Please check prefix of your table. Default "oc_"
This code will change the "Requires Shipping" -> "No" all of your products.
Important !!! Before you start this step, make a backup of the database.
Cheers

Custom OpenCart modules and solutions. Just PM me... Extensions you can find here and here


Active Member

Posts

Joined
Tue Oct 12, 2010 2:23 am

Post by lukeketchum1 » Wed Jul 11, 2018 6:00 pm

thanks for your reply! is there a way to do that for only products in one selected category?

New member

Posts

Joined
Tue Jan 23, 2018 12:30 am

Post by kestas » Wed Jul 11, 2018 7:17 pm

ok, you need use INNER JOIN...
use this code to set shipping not required by category:

Code: Select all

UPDATE oc_product p
INNER JOIN oc_product_to_category ptc
ON ptc.product_id = p.product_id
SET p.shipping = 0
WHERE ptc.category_id = 24
change "24" from my example to your desired category number where your products should be without shipping.

of course do not forget to make backup of your database!!!

Cheers

Custom OpenCart modules and solutions. Just PM me... Extensions you can find here and here


Active Member

Posts

Joined
Tue Oct 12, 2010 2:23 am

Post by lukeketchum1 » Wed Jul 11, 2018 8:38 pm

Wow, it actually worked. 214 lines updated. And the site hasn't exploded yet. Thank you very much! :-D

New member

Posts

Joined
Tue Jan 23, 2018 12:30 am

Post by paulfeakins » Thu Jul 12, 2018 7:22 pm

lukeketchum1 wrote:
Wed Jul 11, 2018 8:38 pm
Wow, it actually worked. 214 lines updated. And the site hasn't exploded yet. Thank you very much! :-D
Give it time.

Just kidding :crazy:

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Expert Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom

Post by lukeketchum1 » Thu Jul 12, 2018 8:29 pm

Haha thats the spirit ;-)

New member

Posts

Joined
Tue Jan 23, 2018 12:30 am

Post by kestas » Thu Jul 12, 2018 8:39 pm

paulfeakins wrote:
Thu Jul 12, 2018 7:22 pm
lukeketchum1 wrote:
Wed Jul 11, 2018 8:38 pm
Wow, it actually worked. 214 lines updated. And the site hasn't exploded yet. Thank you very much! :-D
Give it time.

Just kidding :crazy:
Unfortunately, we will not see if it does :crazy:

Custom OpenCart modules and solutions. Just PM me... Extensions you can find here and here


Active Member

Posts

Joined
Tue Oct 12, 2010 2:23 am
Who is online

Users browsing this forum: No registered users and 10 guests