User Tools

Site Tools


picalook

Picalook

FIXME

Backend

The Git projects for the Picalook backend is located in four places

  • Picalook Middleware for the scripts and direct widget endpoint
  • The Frontend Deploy for the picalook.php endpoint, that receives the lookid and shop to return products, and lilly query to return color data and features data
  • The PCI project, that has picalook endpoint to create, delete, deal with picalook reference looks
  • The v3-lilly-export due to special lilly collections, the 8000XXXX (The four X is the normal shop uid) and the 80007510, this is important for the frontend-deploy

The backend uses MongoDB, Python, FastAPI, Gunicorn, Pymongo (Version 3.13 due to max compatibility with the mongo versions) It's connects to four databases

  • meta_db database (to grab the translated categories, attributes)
  • mapping_service (to grab the translated color data)
  • visualytics setting database (to grab the user, widget_settings and widget_hash collections)
  • visualytics data database (to grab the styles data and the customer data)

The backend steps is:

<HTML><ol></HTML>

  • Run the reference_shop_to_csv.py to generate the CSV file to be imported
  • Add the picalook: true for the customer shop config in the user collection (use uid 4149, madeleine_de_feed as example)
  • Run the customer_shop_to_visualytics.py to add the picalook data to the normal ic_XXXX collection (look at ic_4149 as example)
  • Run the convert_looks_ref_to_customer.py to convert the reference looks from 8000 to the designated shop (Set the uid to 4149 as example)
  • After this, the scripts from v3-lilly-export (lilly_data_from_mongo and export_looks need to be run [lilly_data_from_mongo need to run for the selected customer shop, ex: 4149])
  • After all the frontend import the 8000, 8000XXXX and 80007510, the customer functionality for the widget is set to done<HTML></ol></HTML>

Reference Shop

The reference shop is created by the reference_shop_to_csv.py in the Picalook Middleware, and than imported by the normal CSV process, you need to create an config in the user collection to make it work

Customer Shop

The customer shop, to configure, you need to add in the user config the data picalook: True in the mongo document (look at the madeleine DE in the user collection as example). This is important for the lilly_data_from_mongo script in the v3-lilly-export, because if this is true, it gonna generate the 8000XXXX for the lilly-db. This is important for the convertion of the reference looks to customer looks

picalook Looks (in reference shop)

These looks are created in the Visualytics page, for the “Picalook Shop” that you can select, these looks are saved in the pci_picalook_styles collection in the visualytics data mongo database. The saved data is used to convert them to customer looks

transfer picalook looks into customer shop

To do this, run the script convert_looks_ref_to_customer.py in the Picalook Middleware, you need to select an shop uid to run the script, this gonna copy the ref looks and do the required changes to be an customer shop looks

Frontend

picalook.txt · Last modified: 2024/04/11 14:23 by 127.0.0.1