Sonia Margollé Posted July 14, 2022 Share Posted July 14, 2022 I have products, posters, with variants, different supports (frame, not frame ect) and different format 30x30cm, 70x70cm ect ... Obviously the weight of the final product will be different if there is a frame or not, if it's big or small ect. There is a template for product variants so I can add the padloper properties field to it. I found a function "getOrderWeight" in "Padloper\includes\helper\PadloperUtilities.php", but it's not hookable right ? how can I modify it ? Link to comment Share on other sites More sharing options...
kongondo Posted July 14, 2022 Share Posted July 14, 2022 4 hours ago, Sonia Margollé said: There is a template for product variants so I can add the padloper properties field to it. That's a good plan. Please let me know if you encounter issues. 4 hours ago, Sonia Margollé said: I found a function "getOrderWeight" in "Padloper\includes\helper\PadloperUtilities.php", but it's not hookable right ? how can I modify it ? I'll look into where best to have a hook for order weight and let you know once I've implemented it. Link to comment Share on other sites More sharing options...
Sonia Margollé Posted July 14, 2022 Author Share Posted July 14, 2022 Quote That's a good plan. Please let me know if you encounter issues. I thought it was a good plan, but that doesn't work, when I click on 'Add new property' I have that error message "{"error":true,"message":"Field 'padloper_product_properties_repeater1757' is not applicable to this page"}" Instead, I can add an ordinary text input field to store the weight to the product variant template, that work ! and it will be cleaner ( so I don't have the color property ) Quote I'll look into where best to have a hook for order weight and let you know once I've implemented it. Thanks a lot ! Link to comment Share on other sites More sharing options...
kongondo Posted July 14, 2022 Share Posted July 14, 2022 2 hours ago, Sonia Margollé said: 'Add new property' I have that error message "{"error":true,"message":"Field 'padloper_product_properties_repeater1757' is not applicable to this page"}" I had a feeling that this might happen after I posted my suggestion. 2 hours ago, Sonia Margollé said: Instead, I can add an ordinary text input field to store the weight to the product variant template, that work ! and it will be cleaner ( so I don't have the color property ) This is indeed a better plan. Glad you got it sorted. Link to comment Share on other sites More sharing options...
kongondo Posted July 17, 2022 Share Posted July 17, 2022 Hi @Sonia Margollé, Please have a look at this (demo-2) starter site/demo for an example of hooking into product weight calculation as well as collecting, processing, saving and displaying product customisation details from customers (per your other question here). If the READMEs are not clear, please let me know. Please use your download link to get the latest Padloper 003 files with some new/improved hookable methods. Thanks. Link to comment Share on other sites More sharing options...
Sonia Margollé Posted July 19, 2022 Author Share Posted July 19, 2022 @kongondo Thanks a lot !! 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now