shipping

Woocommerce - Retrieve shipping class

我是研究僧i 提交于 2019-12-02 19:16:48
问题 I use following code on external script to retrieve all products (simple and variable): $args = array( 'post_type' => array('product', 'product_variation'), 'numberposts' => -1, 'post_status' => 'publish', ); $shop_products = get_posts( $args ); foreach ($shop_products as $item) { echo $item->ID.": shipping class is -> ".$item->get_shipping_class()."<br>"; } I need to create a list of product with their own shipping class, but it doesn't works. It shows me the error " Call to undefined method

Magento Fedex Shipping Method Currency

半城伤御伤魂 提交于 2019-12-02 15:42:51
问题 I have magento site with base currency and display is IDR, but the Fedex shipping was calculated the USD price. How can I set the Fedex display currency in IDR? Any help will be appreciate Thanks 回答1: on fedex.com/us/developer/ you will find the fedex developer manual. on page 36 for rate services it offers a solution for your question. RequestedShipment/ Preferred Currency: optional field - indicates the currency the caller requests to have used in all returned monetary values (when a choice

Magento Fedex Shipping Method Currency

别来无恙 提交于 2019-12-02 10:25:31
I have magento site with base currency and display is IDR, but the Fedex shipping was calculated the USD price. How can I set the Fedex display currency in IDR? Any help will be appreciate Thanks on fedex.com/us/developer/ you will find the fedex developer manual. on page 36 for rate services it offers a solution for your question. RequestedShipment/ Preferred Currency: optional field - indicates the currency the caller requests to have used in all returned monetary values (when a choice is possible). <xs:element name="PreferredCurrency" type="xs:string" minOccurs="0"> <xs:annotation> <xs

Woocommerce - Retrieve shipping class

一个人想着一个人 提交于 2019-12-02 10:01:14
I use following code on external script to retrieve all products (simple and variable): $args = array( 'post_type' => array('product', 'product_variation'), 'numberposts' => -1, 'post_status' => 'publish', ); $shop_products = get_posts( $args ); foreach ($shop_products as $item) { echo $item->ID.": shipping class is -> ".$item->get_shipping_class()."<br>"; } I need to create a list of product with their own shipping class, but it doesn't works. It shows me the error " Call to undefined method WP_Post::get_shipping_class() ". What is wrong? How can I fix it? I have modified your code. Try

Add different custom labels to Woocommerce shipping methods

只愿长相守 提交于 2019-12-02 06:45:45
In WooCommerce, I am trying to add "shipping estimates" to my shipping methods (all of them are flat rate type), so it looks like this: Only all the estimated dates are different… My problem is that I can't seem to target specific instances. I can only select entire method (flat rate), I checked for my methods instance ID's, since those are unique: But it only works when I put 0 as a case in php switch method. 2,3,4,5,7 do not work. Here is my code: function sv_shipping_method_estimate_label($label, $method) { $label. = '<br /><small>'; switch ($method - > instance_id) { case 0: $label. = 'Est

Fatal error: Call to a member function toOptionArray() on a non-object in Magento admin

偶尔善良 提交于 2019-12-02 06:06:02
问题 When I click on Shipping Methods tab under Magento system->configuration->SALES tab I am faced with the following error: Fatal error: Call to a member function toOptionArray() on a non-object in D:\xampp\htdocs\magento\app\code\core\Mage\Adminhtml\Block\System\Config\Form.php on line 463 The most astounding thing is that this is a fresh installation of Magento. Can anyone tell me how can I remove this error? 回答1: Add to config.xml <global> <models> <stockindicator> <class>Namespace_ModuleName

Hide specifics Flat Rates when Free Shipping is available in WooCommerce 3

Deadly 提交于 2019-12-02 04:35:26
问题 In WooCommerce 3, I have these shipping options (settings): Free Shipping: free_shipping:1 - Minimum order amount is set at $50 . Normal Shipping flat_rate:3 - Amount $5 . Express Shipping flat_rate:5 - Amount $10 . I would like Express Shipping option to be always available (shown). But when Free shipping is available (meaning that the customer has more than $50 in the cart) I would like to hide Normal Shipping only. So when Free shipping is NOT available (and hidden), the available shipping

Hide specifics Flat Rates when Free Shipping is available in WooCommerce 3

我只是一个虾纸丫 提交于 2019-12-02 00:39:40
In WooCommerce 3, I have these shipping options (settings): Free Shipping: free_shipping:1 - Minimum order amount is set at $50 . Normal Shipping flat_rate:3 - Amount $5 . Express Shipping flat_rate:5 - Amount $10 . I would like Express Shipping option to be always available (shown). But when Free shipping is available (meaning that the customer has more than $50 in the cart) I would like to hide Normal Shipping only. So when Free shipping is NOT available (and hidden), the available shipping rates will be Normal Shipping and Express Shipping. Is that possible? How can I get this on

Fatal error: Call to a member function toOptionArray() on a non-object in Magento admin

青春壹個敷衍的年華 提交于 2019-12-02 00:30:14
When I click on Shipping Methods tab under Magento system->configuration->SALES tab I am faced with the following error: Fatal error: Call to a member function toOptionArray() on a non-object in D:\xampp\htdocs\magento\app\code\core\Mage\Adminhtml\Block\System\Config\Form.php on line 463 The most astounding thing is that this is a fresh installation of Magento. Can anyone tell me how can I remove this error? Add to config.xml <global> <models> <stockindicator> <class>Namespace_ModuleName_Model</class> </stockindicator> </models> </global> Following this tutorial solve the problem => http://kb

Free shipping depending on weight and on minimal cart amount

[亡魂溺海] 提交于 2019-12-01 17:56:28
With WooCommerce, I need to have Free Shipping over certain amount of 250 except the heavy products that are included in the cart. Does anyone know what i should do? Thanks. This custom code will keep free shipping method and will hide other shipping methods when the cart amount is up to 250 and if products are not heavy (less than 20 kg here)… To not allow Free shipping for orders less than 250, you can set this in woocommerce (see at the end). First you will have to sure that the weight is set in each heavy product (for simple or variables products (in each variations). The cart subtotal