Jump to content

[solved] "Save and save" button works randomly


mrKrecik

Recommended Posts

Hey,

 

I've noticed that submit button "Save and stay" sometimes is working, sometimes is not. I checked what goes through POST data and here are to var_dump.

 

First, button is working correctly:

array(97) { ["id_product"]=> string(4) "2561" ["is_virtual"]=> string(1) "0" ["submitted_tabs"]=> array(14) { [0]=> string(12) "Informations" [1]=> string(4) "Pack" [2]=> string(6) "Prices" [3]=> string(3) "Seo" [4]=> string(12) "Associations" [5]=> string(8) "Shipping" [6]=> string(12) "Combinations" [7]=> string(10) "Quantities" [8]=> string(14) "VirtualProduct" [9]=> string(6) "Images" [10]=> string(8) "Features" [11]=> string(13) "Customization" [12]=> string(11) "Attachments" [13]=> string(9) "Suppliers" } ["type_product"]=> string(1) "0" ["curPackItemName"]=> string(0) "" ["curPackItemQty"]=> string(1) "1" ["inputPackItems"]=> string(0) "" ["namePackItems"]=> string(0) "" ["name_1"]=> string(4) "test" ["reference"]=> string(0) "" ["ean13"]=> string(0) "" ["upc"]=> string(0) "" ["active"]=> string(1) "1" ["redirect_type"]=> string(3) "404" ["id_product_redirected"]=> string(1) "0" ["related_product_autocomplete_input"]=> string(0) "" ["visibility"]=> string(4) "both" ["available_for_order"]=> string(1) "1" ["condition"]=> string(3) "new" ["description_short_1"]=> string(0) "" ["description_1"]=> string(0) "" ["tags_1"]=> string(0) "" ["wholesale_price"]=> string(4) "0.00" ["price"]=> string(8) "0.000000" ["price_displayed"]=> string(8) "0.000000" ["id_tax_rules_group"]=> string(1) "1" ["ecotax"]=> string(4) "0.00" ["priceType"]=> string(2) "TE" ["priceTI"]=> string(4) "0.00" ["unit_price"]=> string(8) "0.000000" ["unity"]=> string(0) "" ["sp_id_shop"]=> string(1) "0" ["sp_id_currency"]=> string(1) "0" ["sp_id_country"]=> string(1) "0" ["sp_id_group"]=> string(1) "0" ["sp_id_customer"]=> string(1) "0" ["customer"]=> string(15) "Wszyscy klienci" ["sp_from"]=> string(0) "" ["sp_to"]=> string(0) "" ["sp_from_quantity"]=> string(1) "1" ["leave_bprice"]=> string(1) "1" ["sp_reduction"]=> string(4) "0.00" ["sp_reduction_type"]=> string(6) "amount" ["sp_reduction_tax"]=> string(1) "1" ["specificPricePriority"]=> array(4) { [0]=> string(7) "id_shop" [1]=> string(11) "id_currency" [2]=> string(10) "id_country" [3]=> string(8) "id_group" } ["meta_title_1"]=> string(0) "" ["meta_description_1"]=> string(0) "" ["meta_keywords_1"]=> string(0) "" ["link_rewrite_1"]=> string(4) "test" ["categoryBox"]=> array(2) { [0]=> string(1) "2" [1]=> string(2) "53" } ["id_category_default"]=> string(1) "2" ["inputAccessories"]=> string(0) "" ["nameAccessories"]=> string(0) "" ["product_autocomplete_input"]=> string(0) "" ["width"]=> string(8) "0.000000" ["height"]=> string(8) "0.000000" ["depth"]=> string(8) "0.000000" ["weight"]=> string(8) "0.000000" ["additional_shipping_cost"]=> string(4) "0.00" ["depends_on_stock"]=> string(1) "0" ["pack_stock_type"]=> string(1) "3" ["qty_0"]=> string(1) "0" ["out_of_stock"]=> string(1) "2" ["minimal_quantity"]=> string(1) "1" ["available_now_1"]=> string(0) "" ["available_later_1"]=> string(0) "" ["available_date"]=> string(10) "0000-00-00" ["virtual_product_filename"]=> string(0) "" ["is_virtual_file"]=> string(1) "0" ["filename"]=> string(0) "" ["virtual_product_name"]=> string(0) "" ["virtual_product_nb_downloable"]=> string(0) "" ["virtual_product_expiration_date"]=> string(0) "" ["virtual_product_nb_days"]=> string(1) "0" ["legend_1"]=> string(4) "test" ["id_caption"]=> string(1) "0" ["feature_10_value"]=> string(1) "0" ["custom_10_ALL"]=> string(0) "" ["custom_10_1"]=> string(0) "" ["feature_9_value"]=> string(1) "0" ["custom_9_ALL"]=> string(0) "" ["custom_9_1"]=> string(0) "" ["feature_11_value"]=> string(1) "0" ["custom_11_ALL"]=> string(0) "" ["custom_11_1"]=> string(0) "" ["feature_12_value"]=> string(1) "0" ["custom_12_ALL"]=> string(0) "" ["custom_12_1"]=> string(0) "" ["uploadable_files"]=> string(1) "0" ["text_fields"]=> string(1) "0" ["attachment_name_1"]=> string(0) "" ["attachment_description_1"]=> string(0) "" ["arrayAttachments"]=> string(0) "" ["supplier_loaded"]=> string(1) "1" ["id_product_attribute"]=> string(1) "0" ["key_tab"]=> string(12) "Informations" ["submitAddproductAndStay"]=> string(0) "" }

Second, button isn't working:

array(97) { ["id_product"]=> string(4) "2561" ["is_virtual"]=> string(1) "0" ["submitted_tabs"]=> array(14) { [0]=> string(12) "Informations" [1]=> string(4) "Pack" [2]=> string(6) "Prices" [3]=> string(3) "Seo" [4]=> string(12) "Associations" [5]=> string(8) "Shipping" [6]=> string(12) "Combinations" [7]=> string(10) "Quantities" [8]=> string(14) "VirtualProduct" [9]=> string(6) "Images" [10]=> string(8) "Features" [11]=> string(13) "Customization" [12]=> string(11) "Attachments" [13]=> string(9) "Suppliers" } ["type_product"]=> string(1) "0" ["curPackItemName"]=> string(0) "" ["curPackItemQty"]=> string(1) "1" ["inputPackItems"]=> string(0) "" ["namePackItems"]=> string(0) "" ["name_1"]=> string(4) "test" ["reference"]=> string(0) "" ["ean13"]=> string(0) "" ["upc"]=> string(0) "" ["active"]=> string(1) "1" ["redirect_type"]=> string(3) "404" ["id_product_redirected"]=> string(1) "0" ["related_product_autocomplete_input"]=> string(0) "" ["visibility"]=> string(4) "both" ["available_for_order"]=> string(1) "1" ["condition"]=> string(3) "new" ["description_short_1"]=> string(0) "" ["description_1"]=> string(0) "" ["tags_1"]=> string(0) "" ["wholesale_price"]=> string(4) "0.00" ["price"]=> string(8) "0.000000" ["price_displayed"]=> string(8) "0.000000" ["id_tax_rules_group"]=> string(1) "1" ["ecotax"]=> string(4) "0.00" ["priceType"]=> string(2) "TE" ["priceTI"]=> string(4) "0.00" ["unit_price"]=> string(8) "0.000000" ["unity"]=> string(0) "" ["sp_id_shop"]=> string(1) "0" ["sp_id_currency"]=> string(1) "0" ["sp_id_country"]=> string(1) "0" ["sp_id_group"]=> string(1) "0" ["sp_id_customer"]=> string(1) "0" ["customer"]=> string(15) "Wszyscy klienci" ["sp_from"]=> string(0) "" ["sp_to"]=> string(0) "" ["sp_from_quantity"]=> string(1) "1" ["leave_bprice"]=> string(1) "1" ["sp_reduction"]=> string(4) "0.00" ["sp_reduction_type"]=> string(6) "amount" ["sp_reduction_tax"]=> string(1) "1" ["specificPricePriority"]=> array(4) { [0]=> string(7) "id_shop" [1]=> string(11) "id_currency" [2]=> string(10) "id_country" [3]=> string(8) "id_group" } ["meta_title_1"]=> string(0) "" ["meta_description_1"]=> string(0) "" ["meta_keywords_1"]=> string(0) "" ["link_rewrite_1"]=> string(4) "test" ["categoryBox"]=> array(2) { [0]=> string(1) "2" [1]=> string(2) "53" } ["id_category_default"]=> string(1) "2" ["inputAccessories"]=> string(0) "" ["nameAccessories"]=> string(0) "" ["product_autocomplete_input"]=> string(0) "" ["width"]=> string(8) "0.000000" ["height"]=> string(8) "0.000000" ["depth"]=> string(8) "0.000000" ["weight"]=> string(8) "0.000000" ["additional_shipping_cost"]=> string(4) "0.00" ["depends_on_stock"]=> string(1) "0" ["pack_stock_type"]=> string(1) "3" ["qty_0"]=> string(1) "0" ["out_of_stock"]=> string(1) "2" ["minimal_quantity"]=> string(1) "1" ["available_now_1"]=> string(0) "" ["available_later_1"]=> string(0) "" ["available_date"]=> string(10) "0000-00-00" ["virtual_product_filename"]=> string(0) "" ["is_virtual_file"]=> string(1) "0" ["filename"]=> string(0) "" ["virtual_product_name"]=> string(0) "" ["virtual_product_nb_downloable"]=> string(0) "" ["virtual_product_expiration_date"]=> string(0) "" ["virtual_product_nb_days"]=> string(1) "0" ["legend_1"]=> string(4) "test" ["id_caption"]=> string(1) "0" ["feature_10_value"]=> string(1) "0" ["custom_10_ALL"]=> string(0) "" ["custom_10_1"]=> string(0) "" ["feature_9_value"]=> string(1) "0" ["custom_9_ALL"]=> string(0) "" ["custom_9_1"]=> string(0) "" ["feature_11_value"]=> string(1) "0" ["custom_11_ALL"]=> string(0) "" ["custom_11_1"]=> string(0) "" ["feature_12_value"]=> string(1) "0" ["custom_12_ALL"]=> string(0) "" ["custom_12_1"]=> string(0) "" ["uploadable_files"]=> string(1) "0" ["text_fields"]=> string(1) "0" ["attachment_name_1"]=> string(0) "" ["attachment_description_1"]=> string(0) "" ["arrayAttachments"]=> string(0) "" ["supplier_loaded"]=> string(1) "1" ["id_product_attribute"]=> string(1) "0" ["key_tab"]=> string(12) "Informations" }

So the difference is that submitAddproductAndStay key doesn't exists in second var_dump().

 

By meaning "isn't working" I mean that page is realoading and no changes are affected.

 

Prestashop version 1.6.1.6

Edited by mrKrecik (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...