In this XML, all the modification has been added for personalizing functionality.
Below is the list of files and code description of modified by Artifi personalize module
Code for sending product option of personalizing option to the model file
If personalize option added for product show the selected option, if not then inserting data to the “artifi_personalization_option” table.
Added HTML code for showing personalize option in the dropdown of admin product section
Get the personalized data using “cart_item_id” using the personalize model through this function “getadminPersonalizeData” and also artifi setting data.
Replace one query and added the same query with “cart_item_id” for inserting data in the order_product table after order created by a user.
Added HTML and js code for show personalize data in the order info. Link’s of preview design, download pdf, and download XML. JS for initializing iFrame for show preview.
Get the personalize option data for the product on frontend
Added html,css and js code for loading popup modal on click on personalize button and also show or hide personalize button.
Get the personalize setting and personalize data using the personalize model and set for cart.tpl
Added code for the show the preview link and edit link on the shopping cart. Also added HTML and js for loading preview modal and edit model for the personalized image.
Get the personalized data and set the session id if a guest or if login user set the customer id for updating userID in artifi admin as well as in “artifi_personalize” table.
Added ajax call for update userid in the artifi admin and if get success updating same customer id in Artifi_Personalize table.
After the order is placed successfully opencart calls the success.php controller, and gets the order_id in session. We fetch the personalized data using “order_id” and set for success.tpl file for calling Ajax.
Added ajax call for updating order status as “added to cart” from “Placed” in Artifi admin using “design_id”.
The default behavior of cart.php from the library is, its adding new cart data after customer login. So we have changed this scenario like we are updating the only customer_id after customer login. And replace the same query.
|personalize_id||Related wishlist item id|
Customer Id (if user login)
Session Id for (Guest User)
Order id for personalizing a design
The product code for Artifi iframe
Updated date and time
Default language ID
Personalize option for product