?>

Queries to use in the Webshop Connector

With the queries below you can easily connect your webshop to our API to update the prices in your webshop automatically. If your webshop software is not included most of the time it is easy to define the query yourself. If you have well-tested queries we are happy if you would like to share them with us.

 

OpenCart

Tested with OpenCart version 3.0.3.7

Select Query SELECT price FROM `oc_product` where sku=?
Update Queries update `oc_product` SET price=? where sku=?
Fieldvariables order price,code
VAT percentage Because OpenCart stores the prices without VAT we need to recalculate the price. You need to fill this field with the VAT percentage used in your shop.

Please be aware to change the default table prefix if needed.
In the queries above we use the SKU field to store the unique code for the product.

 

WooCommerce

Tested with Wordpress version 5.7.2 and WooCommerce 5.4.1.

Select Query select pm.meta_value FROM wp_wc_product_meta_lookup ml LEFT JOIN wp_postmeta pm ON ml.product_id=pm.post_id WHERE pm.meta_key="_price" AND ml.sku=?
Update Queries update wp_wc_product_meta_lookup ml LEFT JOIN wp_postmeta pm ON ml.product_id=pm.post_id SET  pm.meta_value=?  WHERE pm.meta_key="_price" AND ml.sku=?;

update wp_wc_product_meta_lookup ml LEFT JOIN wp_postmeta pm ON ml.product_id=pm.post_id SET  pm.meta_value=?  WHERE pm.meta_key="_regular_price"  AND ml.sku=?
Fieldvariables order price,code,price,code

Please be aware to change the default table prefix if needed.
In the queries above we use the SKU field to store the unique code for the product.