adeptmind-prestashop v2.1.1
Prestashop
Prestashop is like wordpress, its opensource code that you can download it and run it
meaning users can be on different version of prestashop and we have no centrealized platform to communicate to, also means we can have very old prestashop versions and with clients with no intention of upgrading, or even if they update the sourcecode and it will be impossible for us to troubleshoot(i think this wont really happen, but it could)
Our plugin will support Prestashop 1.6 and 1.7
Difference between 1.6 and 1.7
- Module Template loading
$this->setTemplate doesnt work in 1.6
path cant prefix with
realm:path
syntax - this may mean that we need an adepter to support multiple versions of prestashop
Technical aspects
We are building a presta-shop module, goal our this module is it will be as light-weight interface to interact with the platform_manager Our module will interface with 3 aspects of a prestashop shopmodule install, configure, storefront(displaying data)
install plugin (5)
- add to /shop/install (5)
- pass in platform, domain, shopname, generates UUID
- how to scrape data then kick off pp-pipeline
option 1. scrape it on the fly (not really feasible as the ONLY, but might be useful to also do during /install phase)
option 2. web services (client must go and enable webservices, then provide us a key) (because they dont have an oauth solution)
option 3. client go and trigger a
rebuild index
type of procedure when they want TODO: findout if there is ways to create like a OAUTH scenario, or use module to create API KEY so we can curl to get products - only option 2 make sense because we'll need to update the products ondemand interface, along with most platform_manager call (not sure how to deal with oauth yet) - this implies there will be some refactoring on platform_manager to support N platforms, shopify logic should be decoupled from platform_manager
configure (3)
- use platform, domian name, shopname as unique identifier?
- this allows us to dynamically display the iframe in the configure page, and save UI config of specific clients to rebuild UI
- data we can save - email - domain - shop name
- https://shopify-app-ui.adeptmind.ai
- when this saves, how do we update UI image
storefront (5)
- prestashop module uses hooks to interact with frontend
- these hooks allows us to inject html (unsafe javascript)
- storefront will use unique identifier to retrieve correct container's UI
- add custom routes to the store (which we can use to display search results)
Platform_manager refactor (8)
- Install pipeline to support N platforms: should still go through entire pipeline/queues to get a deployment, then kickoff
- should consider extracting product retrival logic into a platform agnostic post-install, and send out correct platform specific emails if needed
Product fetching (8)
- https://github.com/AdeptMind/adept-pipeline-shopify/blob/master/adept_pipeline/adept_shopify.py
- Pipieline currently has ability to refetch the catalog to do flips, without oauth.. we MUST gather - user must enable web-services - user api key with permissions on products
We should rebuild the product fetching so pp-bois can fetch products of N platforms with 1 interface that abstracts away the differnces - decide on a sensible product storing convention (whatever we're using now?)
### APIS - `/products`: list of products [ prices, description(in html format so we may need to strip that)] - `/product_option_values`: like sizes, attributes, color is here - `product_features`: like specs, width, height, style - `/categories`: where they locate, like Home, top, women, men - `/images/products/{id}`: images of the product [throws error when asking for it in json....] - `/combinations`: these are the variants of the product, and how they impact the price and have their own images
Haven't figured out
- can we ajax load the UI
- how does it hook back into prestashop carts
7 years ago