Relative Content

Tag Archive for ajaxvue.jsaxiosmoduleprestashop

Prestashop – Unable to Retrieve Axios Parameters in PHP Controller

I’m working on the native BlockWishlist wishlist module. The idea is to add an option in the filtering system by making it customizable by the customer. I added a “custom_order” column to the “ps_wishlist_product” table with the default value of 10000 (so that when sorting the unsorted products end up last). When the “customizable” option is enabled, arrows appear next to products to move products up and down and create a new order. The idea is to record the new order in the database with each move. Initially I wanted to do it in local storage, but if the client changes positions it can be annoying for them to lose their list.
I edited the VueJS view of ProductListContainer.vue in order to add the option and also to be able to order using the vue-draggable module. I can move my elements well. I use Axios because I understand how it works, unlike GraphQL which already seems more technical for what I want to do. So I have two functions: saveOrder and loadOrder.