Jump to content

Products with different carrier - display warning


hotice

Recommended Posts

Hello,

 

I saw a lot of posts regarding this issue and no solution... I have several products with different carriers. So, if a client selects 2 of those products, then he cannot finish the order:

post-1228571-0-60319900-1476706621_thumb.png

As you can see, the logo and the name of the carrier are not displayed.

 

So, I'm trying to edit the order-carrier.tpl file. I want that, in this case, to display a message instead the table in the picture above.

 

This is how the $option variable looks like:

Array
(
    [carrier_list] => Array
        (
            [31] => Array
                (
                    [price_with_tax] => 0
                    [price_without_tax] => 0
                    [package_list] => Array
                        (
                            [0] => 0
                        )

                    [product_list] => Array
                        (
                            [0] => Array
                                (
                                    [id_product_attribute] => 332
                                    [id_product] => 38
                                    [cart_quantity] => 1
                                    [id_shop] => 1
                                    [name] => SmartShip@Home
                                    [is_virtual] => 0
                                    [description_short] => <p style="text-align: center;"><strong>Tarife</strong></p><br /><table style="margin-left: auto; margin-right: auto;"><br /><tbody><br /><tr><br /><td style="text-align: center; background-color: #8dcbff;"></td><br /><td style="text-align: center; background-color: #8dcbff;">Produs</td><br /><td style="text-align: center; background-color: #8dcbff;"><strong><span>Tarif (RON)</span></strong></td><br /></tr><br /><tr><br /><td style="text-align: center; background-color: #8dcbff;">1kg</td><br /><td style="text-align: center; background-color: #8dcbff;">SmartShip</td><br /><td style="text-align: center; background-color: #8dcbff;"><strong><span>25.9</span></strong></td><br /></tr><br /><tr><br /><td style="text-align: center; background-color: #8dcbff;">2kg</td><br /><td style="text-align: center; background-color: #8dcbff;">SmartShip</td><br /><td style="text-align: center; background-color: #8dcbff;"><strong><span>30.9</span></strong></td><br /></tr><br /><tr><br /><td style="text-align: center; background-color: #8dcbff;">3kg</td><br /><td style="text-align: center; background-color: #8dcbff;">SmartShip</td><br /><td style="text-align: center; background-color: #8dcbff;"><strong><span>36.9</span></strong></td><br /></tr><br /><tr><br /><td style="text-align: center; background-color: #8dcbff;">4kg</td><br /><td style="text-align: center; background-color: #8dcbff;">SmartShip</td><br /><td style="text-align: center; background-color: #8dcbff;"><strong><span>43.9</span></strong></td><br /></tr><br /><tr><br /><td style="text-align: center; background-color: #8dcbff;">5kg</td><br /><td style="text-align: center; background-color: #8dcbff;">SmartShip</td><br /><td style="text-align: center; background-color: #8dcbff;"><strong><span>51.9</span></strong></td><br /></tr><br /><tr><br /><td style="text-align: center; background-color: #8dcbff;" colspan="3">>5kg se adauga 9,9 ron pentru fiecare kg</td><br /></tr><br /><tr><br /><td style="background-color: #8dcbff;">Ramburs</td><br /><td style="background-color: #8dcbff;" colspan="2">3,9 ron</td><br /></tr><br /></tbody><br /></table><br /><p>Selecteaza greutatea produsului SmartShip de mai jos, in functie de greutatea pe care o estimezi ca o va avea expedierea ta. Mentionam ca in momentul sosirii produselor comandate in depozitul nostru din UK, acestea se cantaresc fizic si volumetric astfel incat sa iti putem furniza greutatea taxabila exacta. Daca aceasta este mai mica sau depaseste greutatea pe care ai estimat-o, vei primi pe e-mail o informare referitoare la diferenta rezultata si factura aferenta. Totul este sub control!</p>
                                    [available_now] => 
                                    [available_later] => 
                                    [id_category_default] => 14
                                    [id_supplier] => 0
                                    [id_manufacturer] => 0
                                    [on_sale] => 0
                                    [ecotax] => 0.000000
                                    [additional_shipping_cost] => 0.00
                                    [available_for_order] => 1
                                    [price] => 25.9
                                    [active] => 1
                                    [unity] => 
                                    [unit_price_ratio] => 0.000000
                                    [quantity_available] => 492
                                    [width] => 0.000000
                                    [height] => 0.000000
                                    [depth] => 0.000000
                                    [out_of_stock] => 2
                                    [weight] => 1
                                    [date_add] => 2016-04-05 16:58:23
                                    [date_upd] => 2016-09-17 00:32:54
                                    [quantity] => 1
                                    [link_rewrite] => smartship-home
                                    [category] => smartship-comanda-in-uk
                                    [unique_id] => 000000003800000003320
                                    [id_address_delivery] => 0
                                    [advanced_stock_management] => 0
                                    [supplier_reference] => 
                                    [id_customization] => 
                                    [customization_quantity] => 
                                    [price_attribute] => 25.900000
                                    [ecotax_attr] => 0.000000
                                    [reference] => SSH
                                    [weight_attribute] => 1.000000
                                    [ean13] => 
                                    [upc] => 
                                    [minimal_quantity] => 1
                                    [wholesale_price] => 0.000000
                                    [id_image] => 38-38190
                                    [legend] => SmartShip@Home
                                    [reduction_type] => 0
                                    [stock_quantity] => 492
                                    [price_without_reduction] => 25.9
                                    [price_with_reduction] => 25.9
                                    [price_with_reduction_without_tax] => 25.9
                                    [total] => 25.9
                                    [total_wt] => 25.9
                                    [price_wt] => 25.9
                                    [reduction_applies] => 
                                    [quantity_discount_applies] => 
                                    [allow_oosp] => 1
                                    [features] => Array
                                        (
                                        )

                                    [attributes] => Greutate : 1 kg
                                    [attributes_small] => 1 kg
                                    [rate] => 0
                                    [tax_name] => 
                                    [warehouse_list] => Array
                                        (
                                            [0] => 0
                                        )

                                    [in_stock] => 1
                                    [carrier_list] => Array
                                        (
                                            [31] => 31
                                        )

                                )

                        )

                    [instance] => Carrier Object
                        (
                            [id_reference] => 12
                            [name] => Urgent Cargus SmartShip
                            [url] => 
                            [delay] => Array
                                (
                                    [2] => 7-12 zile
                                )

                            [active] => 1
                            [deleted] => 0
                            [shipping_handling] => 0
                            [range_behavior] => 0
                            [is_module] => 1
                            [is_free] => 1
                            [shipping_method] => 1
                            [shipping_external] => 1
                            [external_module_name] => urgentcargus
                            [need_range] => 1
                            [position] => 2
                            [max_width] => 0
                            [max_height] => 0
                            [max_depth] => 0
                            [max_weight] => 0.000000
                            [grade] => 0
                            [webserviceParameters:protected] => Array
                                (
                                    [fields] => Array
                                        (
                                            [deleted] => Array
                                                (
                                                )

                                            [is_module] => Array
                                                (
                                                )

                                            [id_tax_rules_group] => Array
                                                (
                                                    [getter] => getIdTaxRulesGroup
                                                    [setter] => setTaxRulesGroup
                                                    [xlink_resource] => Array
                                                        (
                                                            [resourceName] => tax_rule_groups
                                                        )

                                                )

                                        )

                                )

                            [id] => 31
                            [id_lang:protected] => 
                            [id_shop:protected] => 1
                            [id_shop_list] => 
                            [get_shop_from_context:protected] => 1
                            [table:protected] => carrier
                            [identifier:protected] => id_carrier
                            [fieldsRequired:protected] => Array
                                (
                                    [0] => name
                                    [1] => active
                                )

                            [fieldsSize:protected] => Array
                                (
                                    [name] => 64
                                    [grade] => 1
                                    [external_module_name] => 64
                                )

                            [fieldsValidate:protected] => Array
                                (
                                    [name] => isCarrierName
                                    [active] => isBool
                                    [is_free] => isBool
                                    [url] => isAbsoluteUrl
                                    [shipping_handling] => isBool
                                    [range_behavior] => isBool
                                    [shipping_method] => isUnsignedInt
                                    [max_width] => isUnsignedInt
                                    [max_height] => isUnsignedInt
                                    [max_depth] => isUnsignedInt
                                    [max_weight] => isFloat
                                    [grade] => isUnsignedInt
                                    [is_module] => isBool
                                    [deleted] => isBool
                                )

                            [fieldsRequiredLang:protected] => Array
                                (
                                    [0] => delay
                                )

                            [fieldsSizeLang:protected] => Array
                                (
                                    [delay] => 128
                                )

                            [fieldsValidateLang:protected] => Array
                                (
                                    [delay] => isGenericName
                                )

                            [tables:protected] => Array
                                (
                                )

                            [image_dir:protected] => /home/esmartwa/public_html/img/s/
                            [image_format:protected] => jpg
                            [def:protected] => Array
                                (
                                    [table] => carrier
                                    [primary] => id_carrier
                                    [multilang] => 1
                                    [multilang_shop] => 1
                                    [fields] => Array
                                        (
                                            [id_reference] => Array
                                                (
                                                    [type] => 1
                                                )

                                            [name] => Array
                                                (
                                                    [type] => 3
                                                    [validate] => isCarrierName
                                                    [required] => 1
                                                    [size] => 64
                                                )

                                            [active] => Array
                                                (
                                                    [type] => 2
                                                    [validate] => isBool
                                                    [required] => 1
                                                )

                                            [is_free] => Array
                                                (
                                                    [type] => 2
                                                    [validate] => isBool
                                                )

                                            [url] => Array
                                                (
                                                    [type] => 3
                                                    [validate] => isAbsoluteUrl
                                                )

                                            [shipping_handling] => Array
                                                (
                                                    [type] => 2
                                                    [validate] => isBool
                                                )

                                            [shipping_external] => Array
                                                (
                                                    [type] => 2
                                                )

                                            [range_behavior] => Array
                                                (
                                                    [type] => 2
                                                    [validate] => isBool
                                                )

                                            [shipping_method] => Array
                                                (
                                                    [type] => 1
                                                    [validate] => isUnsignedInt
                                                )

                                            [max_width] => Array
                                                (
                                                    [type] => 1
                                                    [validate] => isUnsignedInt
                                                )

                                            [max_height] => Array
                                                (
                                                    [type] => 1
                                                    [validate] => isUnsignedInt
                                                )

                                            [max_depth] => Array
                                                (
                                                    [type] => 1
                                                    [validate] => isUnsignedInt
                                                )

                                            [max_weight] => Array
                                                (
                                                    [type] => 4
                                                    [validate] => isFloat
                                                )

                                            [grade] => Array
                                                (
                                                    [type] => 1
                                                    [validate] => isUnsignedInt
                                                    [size] => 1
                                                )

                                            [external_module_name] => Array
                                                (
                                                    [type] => 3
                                                    [size] => 64
                                                )

                                            [is_module] => Array
                                                (
                                                    [type] => 2
                                                    [validate] => isBool
                                                )

                                            [need_range] => Array
                                                (
                                                    [type] => 2
                                                )

                                            [position] => Array
                                                (
                                                    [type] => 1
                                                )

                                            [deleted] => Array
                                                (
                                                    [type] => 2
                                                    [validate] => isBool
                                                )

                                            [delay] => Array
                                                (
                                                    [type] => 3
                                                    [lang] => 1
                                                    [validate] => isGenericName
                                                    [required] => 1
                                                    [size] => 128
                                                )

                                        )

                                    [classname] => Carrier
                                    [associations] => Array
                                        (
                                            [l] => Array
                                                (
                                                    [type] => 2
                                                    [field] => id_carrier
                                                    [foreign_field] => id_carrier
                                                )

                                        )

                                )

                            [update_fields:protected] => 
                            [force_id] => 
                            [id_tax_rules_group] => 0
                        )

                    [logo] => /img/s/31.jpg
                )

            [35] => Array
                (
                    [price_with_tax] => 19
                    [price_without_tax] => 19
                    [package_list] => Array
                        (
                            [0] => 1
                        )

                    [product_list] => Array
                        (
                            [0] => Array
                                (
                                    [id_product_attribute] => 55964
                                    [id_product] => 10313
                                    [cart_quantity] => 1
                                    [id_shop] => 1
                                    [name] => Steelite Trekker boot S1P (FW63)
                                    [is_virtual] => 0
                                    [description_short] => <p>S1 trekker boot in a workwear friendly colour combination of black and grey with thermal plastic rubber labels and closed eyelets.</p>
                                    [available_now] => 
                                    [available_later] => 
                                    [id_category_default] => 78
                                    [id_supplier] => 3
                                    [id_manufacturer] => 81
                                    [on_sale] => 1
                                    [ecotax] => 0.000000
                                    [additional_shipping_cost] => 0.00
                                    [available_for_order] => 1
                                    [price] => 147.17448
                                    [active] => 1
                                    [unity] => 
                                    [unit_price_ratio] => 0.000000
                                    [quantity_available] => 500
                                    [width] => 0.000000
                                    [height] => 0.000000
                                    [depth] => 0.000000
                                    [out_of_stock] => 0
                                    [weight] => 0
                                    [date_add] => 2016-08-17 14:57:44
                                    [date_upd] => 2016-09-26 12:37:22
                                    [quantity] => 1
                                    [link_rewrite] => steelitea-trekker-boot-s1p-fw63
                                    [category] => incaltaminte
                                    [unique_id] => 000001031300000559640
                                    [id_address_delivery] => 0
                                    [advanced_stock_management] => 0
                                    [supplier_reference] => 
                                    [id_customization] => 
                                    [customization_quantity] => 
                                    [price_attribute] => 0.000000
                                    [ecotax_attr] => 0.000000
                                    [reference] => PW328BLAC7
                                    [weight_attribute] => 0.000000
                                    [ean13] => 
                                    [upc] => 
                                    [minimal_quantity] => 1
                                    [wholesale_price] => 0.000000
                                    [id_image] => 10313-52581
                                    [legend] => Steeliteâ„¢ Trekker boot S1P (FW63)
                                    [reduction_type] => percentage
                                    [stock_quantity] => 500
                                    [price_without_reduction] => 163.5272
                                    [price_with_reduction] => 147.17448
                                    [price_with_reduction_without_tax] => 147.17448
                                    [total] => 147.17
                                    [total_wt] => 147.17
                                    [price_wt] => 147.17448
                                    [reduction_applies] => 1
                                    [quantity_discount_applies] => 1
                                    [allow_oosp] => 0
                                    [features] => Array
                                        (
                                        )

                                    [attributes] => Marime : 7, Culoare : Black
                                    [attributes_small] => 7, Black
                                    [rate] => 0
                                    [tax_name] => 
                                    [warehouse_list] => Array
                                        (
                                            [0] => 0
                                        )

                                    [in_stock] => 1
                                    [carrier_list] => Array
                                        (
                                            [35] => 35
                                        )

                                )

                        )

                    [instance] => Carrier Object
                        (
                            [id_reference] => 18
                            [name] => Urgent Cargus SmartyShop
                            [url] => 
                            [delay] => Array
                                (
                                    [2] => 7-12 zile
                                )

                            [active] => 1
                            [deleted] => 0
                            [shipping_handling] => 0
                            [range_behavior] => 0
                            [is_module] => 0
                            [is_free] => 0
                            [shipping_method] => 2
                            [shipping_external] => 0
                            [external_module_name] => 
                            [need_range] => 0
                            [position] => 3
                            [max_width] => 0
                            [max_height] => 0
                            [max_depth] => 0
                            [max_weight] => 0.000000
                            [grade] => 0
                            [webserviceParameters:protected] => Array
                                (
                                    [fields] => Array
                                        (
                                            [deleted] => Array
                                                (
                                                )

                                            [is_module] => Array
                                                (
                                                )

                                            [id_tax_rules_group] => Array
                                                (
                                                    [getter] => getIdTaxRulesGroup
                                                    [setter] => setTaxRulesGroup
                                                    [xlink_resource] => Array
                                                        (
                                                            [resourceName] => tax_rule_groups
                                                        )

                                                )

                                        )

                                )

                            [id] => 35
                            [id_lang:protected] => 
                            [id_shop:protected] => 1
                            [id_shop_list] => 
                            [get_shop_from_context:protected] => 1
                            [table:protected] => carrier
                            [identifier:protected] => id_carrier
                            [fieldsRequired:protected] => Array
                                (
                                    [0] => name
                                    [1] => active
                                )

                            [fieldsSize:protected] => Array
                                (
                                    [name] => 64
                                    [grade] => 1
                                    [external_module_name] => 64
                                )

                            [fieldsValidate:protected] => Array
                                (
                                    [name] => isCarrierName
                                    [active] => isBool
                                    [is_free] => isBool
                                    [url] => isAbsoluteUrl
                                    [shipping_handling] => isBool
                                    [range_behavior] => isBool
                                    [shipping_method] => isUnsignedInt
                                    [max_width] => isUnsignedInt
                                    [max_height] => isUnsignedInt
                                    [max_depth] => isUnsignedInt
                                    [max_weight] => isFloat
                                    [grade] => isUnsignedInt
                                    [is_module] => isBool
                                    [deleted] => isBool
                                )

                            [fieldsRequiredLang:protected] => Array
                                (
                                    [0] => delay
                                )

                            [fieldsSizeLang:protected] => Array
                                (
                                    [delay] => 128
                                )

                            [fieldsValidateLang:protected] => Array
                                (
                                    [delay] => isGenericName
                                )

                            [tables:protected] => Array
                                (
                                )

                            [image_dir:protected] => /home/esmartwa/public_html/img/s/
                            [image_format:protected] => jpg
                            [def:protected] => Array
                                (
                                    [table] => carrier
                                    [primary] => id_carrier
                                    [multilang] => 1
                                    [multilang_shop] => 1
                                    [fields] => Array
                                        (
                                            [id_reference] => Array
                                                (
                                                    [type] => 1
                                                )

                                            [name] => Array
                                                (
                                                    [type] => 3
                                                    [validate] => isCarrierName
                                                    [required] => 1
                                                    [size] => 64
                                                )

                                            [active] => Array
                                                (
                                                    [type] => 2
                                                    [validate] => isBool
                                                    [required] => 1
                                                )

                                            [is_free] => Array
                                                (
                                                    [type] => 2
                                                    [validate] => isBool
                                                )

                                            [url] => Array
                                                (
                                                    [type] => 3
                                                    [validate] => isAbsoluteUrl
                                                )

                                            [shipping_handling] => Array
                                                (
                                                    [type] => 2
                                                    [validate] => isBool
                                                )

                                            [shipping_external] => Array
                                                (
                                                    [type] => 2
                                                )

                                            [range_behavior] => Array
                                                (
                                                    [type] => 2
                                                    [validate] => isBool
                                                )

                                            [shipping_method] => Array
                                                (
                                                    [type] => 1
                                                    [validate] => isUnsignedInt
                                                )

                                            [max_width] => Array
                                                (
                                                    [type] => 1
                                                    [validate] => isUnsignedInt
                                                )

                                            [max_height] => Array
                                                (
                                                    [type] => 1
                                                    [validate] => isUnsignedInt
                                                )

                                            [max_depth] => Array
                                                (
                                                    [type] => 1
                                                    [validate] => isUnsignedInt
                                                )

                                            [max_weight] => Array
                                                (
                                                    [type] => 4
                                                    [validate] => isFloat
                                                )

                                            [grade] => Array
                                                (
                                                    [type] => 1
                                                    [validate] => isUnsignedInt
                                                    [size] => 1
                                                )

                                            [external_module_name] => Array
                                                (
                                                    [type] => 3
                                                    [size] => 64
                                                )

                                            [is_module] => Array
                                                (
                                                    [type] => 2
                                                    [validate] => isBool
                                                )

                                            [need_range] => Array
                                                (
                                                    [type] => 2
                                                )

                                            [position] => Array
                                                (
                                                    [type] => 1
                                                )

                                            [deleted] => Array
                                                (
                                                    [type] => 2
                                                    [validate] => isBool
                                                )

                                            [delay] => Array
                                                (
                                                    [type] => 3
                                                    [lang] => 1
                                                    [validate] => isGenericName
                                                    [required] => 1
                                                    [size] => 128
                                                )

                                        )

                                    [classname] => Carrier
                                    [associations] => Array
                                        (
                                            [l] => Array
                                                (
                                                    [type] => 2
                                                    [field] => id_carrier
                                                    [foreign_field] => id_carrier
                                                )

                                        )

                                )

                            [update_fields:protected] => 
                            [force_id] => 
                            [id_tax_rules_group] => 0
                        )

                    [logo] => /img/s/35.jpg
                )

        )

    [is_best_price] => 1
    [is_best_grade] => 1
    [unique_carrier] => 
    [total_price_with_tax] => 19
    [total_price_without_tax] => 19
    [is_free] => 
    [position] => 2.5
)
1

Can anybody please help me with this?

Thanks!

Link to comment
Share on other sites

why can they not complete checkout, ps will combine shipping as displayed when there is different shipping related to product level shipping association.

They can complete the checkout, but the process seems not to work as desired... Let me explain. I have 2 products and 2 carriers:

- product 1
	- price: 1700 RON
	- Carrier 1
- product 2
	- price 50 RON
	- Carrier 2
	
- Carrier 1
	- cart price from 0 to 150 -> 19 RON
	- cart price from 150 to 99999 -> 0 RON
	- delivery time: 7-10 days
- Carrier 2
	- cart price from 0 to 200 -> 14 RON
	- cart price from 200 to 99999 -> 0 RON
	- delivery time: 1-2 days

So, if a customer buys only product 1, he will get free shipping and it will be informed that the transit time is 7 to 10 days. If he buys only product 2, he will have to pay for shipping 14 RON and he will be informed that the transit time is 1 to 2 days.

But, if he buys both products, he will have to pay 16 RON (i think this is the average between the 2 shipping fees) and he gets no information about the transit time. Instead, because of the big amount of the order, he should get free shipping and and info for the transit time on each product...

 

To avoid this, I want that in this scenario, to block user to complete the checkout and, instead of displaying that "average shipping cost", I want to show an alert message, asking him not to combine those 2 products.

 

Cheers!

Link to comment
Share on other sites

They can complete the checkout, but the process seems not to work as desired... Let me explain. I have 2 products and 2 carriers:

- product 1
	- price: 1700 RON
	- Carrier 1
- product 2
	- price 50 RON
	- Carrier 2
	
- Carrier 1
	- cart price from 0 to 150 -> 19 RON
	- cart price from 150 to 99999 -> 0 RON
	- delivery time: 7-10 days
- Carrier 2
	- cart price from 0 to 200 -> 14 RON
	- cart price from 200 to 99999 -> 0 RON
	- delivery time: 1-2 days

So, if a customer buys only product 1, he will get free shipping and it will be informed that the transit time is 7 to 10 days. If he buys only product 2, he will have to pay for shipping 14 RON and he will be informed that the transit time is 1 to 2 days.

But, if he buys both products, he will have to pay 16 RON (i think this is the average between the 2 shipping fees) and he gets no information about the transit time. Instead, because of the big amount of the order, he should get free shipping and and info for the transit time on each product...

 

To avoid this, I want that in this scenario, to block user to complete the checkout and, instead of displaying that "average shipping cost", I want to show an alert message, asking him not to combine those 2 products.

 

Cheers!

 

when the visitors add two products to cart, and because you have at least one product level shipping association, the only thing that is confusing you is that at checkout the shipping is combined, i.e. free/paid.  Now it does not display combined shipping 'carriers'.  We are in process of solving product level shipping as we have for by country level shipping,  and that is why I am happy to participate in this topic.  Please also review: https://1617.prestaheroes.com/  see navbar for shipping localization.

Edited by El Patron (see edit history)
Link to comment
Share on other sites

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