Sold Already worked with shops that sold to real people For Clients It was a project for a client of you or the agency you worked For Self It was for yourself or a company you were employed 3 Photo by Fikret tozak on Unsplash
clients‘ success Full service Marketing agency with not only web in mind WordPress 10 years + experience, hundreds of websites WooCommerce For clients and also for our own projects 4 Photo by Fikret tozak on Unsplash Photos by FALKEmedia GmbH
database Fetch data Local machine gets XML from ERP daily and pushes to web Webserver Script reads all new XML files, processes, imports to WooCommerce Time sensitive Everything is timed precisely, from local export to server cronjobs 7
changes from ERP • 10 pm: Start to transmit XML to web server Webserver / 5-min cronjob • 12 am: Start to check for complete delivery and run import • 5 am: Status-check and maybe status-mail Delete various frontend caches Start cache pre-generation (ongoing) Cronjob should be executed exclusively (Hosting setting) 8 Photo by Andrik Langfield on Unsplash
(was slow in our tests) • Custom PHP script with WordPress environment loaded (much faster) • WC CLI would probably be even better • Any experiences? 9 Photo by Andrik Langfield on Unsplash Photo by AbsolutVision on Unsplash
Combine XMLReader and SimpleXMLElement Please use Google or ChatGPT to find out more details on functions used. https://drib.tech/programming/parse-large-xml-files-php
Please use Google or ChatGPT to find out more details on functions used. Stick to the WooCommerce functions and avoid wp_insert_post for example. (Product type would be missing and product not found in certain queries) https://woocommerce.github.io/code-reference/
(FTP provides so much possible failures) • Check if transmission is really done (Directory Checksum) • Lock directory while reading (Right management or simply rename via script) • Error handling (File size, corrupt XML, …) • Everything done right from client side? (Categories missing, too big binaries, …) • Archive transmissions from past 30 days (Debugging) 15 Photo by Andrik Langfield on Unsplash Photo by AbsolutVision on Unsplash
• Have status available, if client calls ;) • Have even more detailed logs available (Debugging) • We are very happy with a status-table in our WordPress DB • Give the client a status-page in addition to emails, which reads out status-table 16 Photo by Andrik Langfield on Unsplash Photo by Solen Feyissa on Unsplash
so they can first check if anything was wrong with their data before calling you that a product is not listed ;) Please use Google or ChatGPT to find out more details on functions used.
great caching plugins • Simple & fast setup • Priority cache preload via XML sitemap • https://de-at.wordpress.org/plugins/wp- fastest-cache/ • https://www.wpfastestcache.com/ Offers lifetime licenses (no affiliate) 22 Photo by Marc-Olivier Jodoin on Unsplash
cached result, so that nobody has to wait • Usually either first visit triggers cache or it is created in some fixed order • Create a hit-table in your database, so you can query most visited pages from last 30 days • Put these in a xml sitemap and use WP Fastest Caches sitemap functionality (https://www.wpfastestcache.com/features/prel oad-settings/) • Share your feedback and ideas with developers 23
• Simple templates, great to customize • Define, which meta keys to search • https://de-at.wordpress.org/plugins/ajax- search-for-woocommerce/ • https://fibosearch.com/ Offers lifetime licenses (no affiliate) 24 Photo by fibosearch.com
our product overview pages and in single pages • Add prices after pageload, only if user is logged in • Infinite scrolling for categories and sub- categories • Better performance for initial pageload on categories with lots of products – only empty divs with category id as attribute present • Not possible with plugins we know, so we use a simple disk cache for it 25 Photo by Xu Haiwei on Unsplash
heavy load projects • Use well scaled images in webp format • Use lazy loading for images • Do not use bloated themes • Do not use plugins with much overhead • … • Generate local lighthouse reports from your incognito browser for real insights 27 Photo by Surface on Unsplash