What is shipping_price in Shipping plugins

  • Posts: 64
  • Thank you received: 0
11 years 1 month ago #129134

I am creating a custom shipping plugin.

For one of the order, local_usable_rates details are this-

Array
(
    [5] => stdClass Object
        (
            [shipping_id] => 5
            [shipping_type] => custom_manual
            [shipping_zone_namekey] => 
            [shipping_tax_id] => 0
            [shipping_price] => 6.15
            [shipping_currency_id] => 5
            [shipping_name] => Custom Plugin
            [shipping_description] => Test
            [shipping_published] => 1
            [shipping_ordering] => 1
            [shipping_params] => stdClass Object
                (
                    [shipping_percentage] => 0
                    [shipping_per_product] => 1
                    [shipping_price_per_product] => 1
                    [shipping_override_address] => 0
                    [shipping_override_address_text] => 
                    [shiptoschool] => 1
                    [other_name] => Other
                    [other_price] => 20
                    [shipping_warehouse_filter] => 
                    [shipping_min_price] => 0
                    [shipping_max_price] => 0
                    [shipping_virtual_included] => 1
                    [shipping_price_use_tax] => 1
                    [shipping_min_quantity] => 
                    [shipping_max_quantity] => 
                    [shipping_min_weight] => 
                    [shipping_weight_unit] => kg
                    [shipping_max_weight] => 
                    [shipping_min_volume] => 
                    [shipping_size_unit] => m
                    [shipping_max_volume] => 
                    [shipping_zip_prefix] => 
                    [shipping_min_zip] => 
                    [shipping_max_zip] => 
                    [shipping_zip_suffix] =>                   
                    [shipping_min_price_orig] => 
                    [shipping_max_price_orig] => 
                )

            [shipping_images] => 
            [shipping_access] => all
            [shipping_price_orig] => 5.00000
            [shipping_currency_id_orig] => 2
            [shippingkey] => 0
            [shipping_price_base] => 5.1539484398998
        )

)

What is shipping_price & shipping_price_base?

I am calculating shipping_price but instead of getting x I am getting (x + .15)
where x is- (shipping_price_orig + 20(other_price) +(price_per_quantity*product_quantity))

Thanks,

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
11 years 1 month ago #129154

You forgot the conversion of the shipping_price_orig from the currency with the id 2 to the currency with the id 5

The following user(s) said Thank You: irfanhanfi

Please Log in or Create an account to join the conversation.

Time to create page: 0.054 seconds
Powered by Kunena Forum