{"id":42336,"date":"2026-11-22T13:15:25","date_gmt":"2026-11-22T11:15:25","guid":{"rendered":"https:\/\/coma.lv\/2026\/11\/22\/viola-farma-woocommerce-store-1c-import\/"},"modified":"2026-11-22T21:26:15","modified_gmt":"2026-11-22T19:26:15","slug":"viola-farma-woocommerce-store-1c-import","status":"publish","type":"post","link":"https:\/\/coma.lv\/en\/2026\/11\/22\/viola-farma-woocommerce-store-1c-import\/","title":{"rendered":"Viola Farma: a new WooCommerce store with 1C import and a faster mobile version"},"content":{"rendered":"<p>Viola Farma in Riga sells herbal teas, food supplements, natural cosmetics and essential oils. The online store has about 525 products in 56 categories, with buyers in Latvia, the Baltics and elsewhere in the EU.<\/p>\n<p>The old store was built several years ago and was no longer updated. In the new version we rebuilt both how the store looks and how products get to it from 1C. The short project description is in the <a href=\"https:\/\/coma.lv\/en\/portfolio-item\/viola-farma\/\">Viola Farma portfolio<\/a>; here we explain the main decisions and the numbers.<\/p>\n<h2>What the old store was like<\/h2>\n<p>The page code is kept in the Web Archive, and the photos, styles and scripts are still on the old hosting. We used both to restore how the old store looked for the screenshots and video.<\/p>\n<p>The store ran on WooCommerce 7.2 from 2022. The homepage HTML weighed 459 KB, the page loaded 85 scripts and 54 stylesheets, and 184 of 185 images had no alt text. The menu, search and cart only started working after the visitor\u2019s first action, because the scripts were delayed.<\/p>\n<p>The old hosting had 85 plugins, 52 of them active. Many duplicated each other: three menu plugins, two caching plugins plus another optimiser, two WebP converters, three cookie-notice plugins and eight separate delivery plugins. Two translation systems ran at the same time, Polylang and the older qTranslate \u2013 for 738 of 741 products the texts were stored in qTranslate tags in a single field. Products came from 1C through a separate plugin and a hand-written script in the site root. The database had 125 tables, many left over from plugins removed long ago.<\/p>\n<div style=\"overflow-x:auto;\">\n<table style=\"width:100%;border-collapse:collapse;margin:0 0 18px;\">\n<thead>\n<tr>\n<th style=\"text-align:left;padding:10px 12px;border-bottom:2px solid #b48e5f;\">Homepage<\/th>\n<th style=\"text-align:left;padding:10px 12px;border-bottom:2px solid #b48e5f;\">Old store<\/th>\n<th style=\"text-align:left;padding:10px 12px;border-bottom:2px solid #b48e5f;\">New store<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"padding:9px 12px;border-bottom:1px solid #e5e5e5;\">HTML size<\/td>\n<td style=\"padding:9px 12px;border-bottom:1px solid #e5e5e5;\">459 KB<\/td>\n<td style=\"padding:9px 12px;border-bottom:1px solid #e5e5e5;font-weight:600;\">180 KB<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:9px 12px;border-bottom:1px solid #e5e5e5;\">Scripts \/ stylesheets<\/td>\n<td style=\"padding:9px 12px;border-bottom:1px solid #e5e5e5;\">85 \/ 54<\/td>\n<td style=\"padding:9px 12px;border-bottom:1px solid #e5e5e5;font-weight:600;\">49 \/ 13<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:9px 12px;border-bottom:1px solid #e5e5e5;\">Images without alt text<\/td>\n<td style=\"padding:9px 12px;border-bottom:1px solid #e5e5e5;\">184 of 185<\/td>\n<td style=\"padding:9px 12px;border-bottom:1px solid #e5e5e5;font-weight:600;\">21 of 113<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:9px 12px;border-bottom:1px solid #e5e5e5;\">Active plugins<\/td>\n<td style=\"padding:9px 12px;border-bottom:1px solid #e5e5e5;\">52<\/td>\n<td style=\"padding:9px 12px;border-bottom:1px solid #e5e5e5;font-weight:600;\">32<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:9px 12px;border-bottom:1px solid #e5e5e5;\">WooCommerce<\/td>\n<td style=\"padding:9px 12px;border-bottom:1px solid #e5e5e5;\">7.2 (2022)<\/td>\n<td style=\"padding:9px 12px;border-bottom:1px solid #e5e5e5;font-weight:600;\">11.2<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div style=\"display:flex;flex-wrap:wrap;gap:20px;max-width:1100px;margin:0 auto 28px;\">\n<figure style=\"flex:1 1 280px;margin:0;\"><img decoding=\"async\" src=\"https:\/\/coma.lv\/wp-content\/uploads\/2026\/11\/violafarma-old-desktop-v3.jpg\" alt=\"Old store (2025)\" loading=\"lazy\" style=\"width:100%;height:auto;border-radius:10px;border:1px solid #e5e5e5;display:block;\" title=\"\"><figcaption style=\"text-align:center;font-size:14px;color:#777;margin-top:6px;\">Old store (2025)<\/figcaption><\/figure>\n<figure style=\"flex:1 1 280px;margin:0;\"><img decoding=\"async\" src=\"https:\/\/coma.lv\/wp-content\/uploads\/2026\/11\/violafarma-new-desktop-v2.jpg\" alt=\"New store (2026)\" loading=\"lazy\" style=\"width:100%;height:auto;border-radius:10px;border:1px solid #e5e5e5;display:block;\" title=\"\"><figcaption style=\"text-align:center;font-size:14px;color:#777;margin-top:6px;\">New store (2026)<\/figcaption><\/figure>\n<\/div>\n<h2>Products from 1C, no manual entry<\/h2>\n<p>Viola Farma keeps products, prices and stock in 1C, which exports an XML file and product photos. Our script turns the XML into two CSV files \u2013 categories and products in Latvian, Russian and English \u2013 and WP All Import loads them into WooCommerce.<\/p>\n<p>WPML links the language versions, so one product is one record in three languages with a shared price and stock. Prices and stock are updated by the next import, not by staff.<\/p>\n<h2>Promotions that calculate themselves<\/h2>\n<p>Health products have a best-before date. In the 1C export every product has batches with dates. When a batch gets within a set number of months of expiry, those units automatically move to the \u201cSale\u201d section at a discount, while the rest of the same product stays in the catalogue at the regular price.<\/p>\n<p>The team sets bulk discounts for the whole catalogue, categories or chosen products in the admin. If several discounts apply, the largest wins, and manually entered sale prices are never overwritten.<\/p>\n<h2>Cart, delivery and VAT<\/h2>\n<p>Checkout is a single page. Delivery options are Omniva, Latvijas Pasts, Venipak and Smartpost parcel lockers, courier, in-store pickup and UPS to other EU countries. Delivery is set up in 14 zones, and zones and rates can be changed without a developer.<\/p>\n<p>VAT is charged by the buyer\u2019s country, with rates set for 28 countries. Payment is via Paysera (banks and cards), PayPal and bank transfer, with PDF invoices in Latvian.<\/p>\n<h2>Speed after launch<\/h2>\n<p>The new server responds fast and steadily: the first byte arrives in ~65 ms on every run. But on a phone with slow internet, the big homepage banner appeared only after 8.8 seconds at launch. The browser learned about it late and loaded it alongside a hundred other files.<\/p>\n<p>We fixed this on the server side without changing the design:<\/p>\n<ul>\n<li>the first banner starts loading together with the page;<\/li>\n<li>the homepage shows the image sizes WordPress already generated, not the originals;<\/li>\n<li>the contact form and reCAPTCHA load only on \u201cContacts\u201d, delivery scripts only in the cart and checkout;<\/li>\n<li>images and fonts are cached in the browser for a year.<\/li>\n<\/ul>\n<div style=\"overflow-x:auto;\">\n<table style=\"width:100%;border-collapse:collapse;margin:0 0 18px;\">\n<thead>\n<tr>\n<th style=\"text-align:left;padding:10px 12px;border-bottom:2px solid #b48e5f;\">Mobile Slow 4G<\/th>\n<th style=\"text-align:left;padding:10px 12px;border-bottom:2px solid #b48e5f;\">At launch<\/th>\n<th style=\"text-align:left;padding:10px 12px;border-bottom:2px solid #b48e5f;\">After optimisation<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"padding:9px 12px;border-bottom:1px solid #e5e5e5;\">Homepage LCP<\/td>\n<td style=\"padding:9px 12px;border-bottom:1px solid #e5e5e5;\">8.8 s<\/td>\n<td style=\"padding:9px 12px;border-bottom:1px solid #e5e5e5;font-weight:600;\">3.5 s<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:9px 12px;border-bottom:1px solid #e5e5e5;\">Full load<\/td>\n<td style=\"padding:9px 12px;border-bottom:1px solid #e5e5e5;\">13.4 s<\/td>\n<td style=\"padding:9px 12px;border-bottom:1px solid #e5e5e5;font-weight:600;\">6.2 s<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:9px 12px;border-bottom:1px solid #e5e5e5;\">PageSpeed, homepage<\/td>\n<td style=\"padding:9px 12px;border-bottom:1px solid #e5e5e5;\">58<\/td>\n<td style=\"padding:9px 12px;border-bottom:1px solid #e5e5e5;font-weight:600;\">72<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:9px 12px;border-bottom:1px solid #e5e5e5;\">PageSpeed, category<\/td>\n<td style=\"padding:9px 12px;border-bottom:1px solid #e5e5e5;\">52<\/td>\n<td style=\"padding:9px 12px;border-bottom:1px solid #e5e5e5;font-weight:600;\">79<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p style=\"font-size:14px;color:#777;\">Measured 20.11.2026: Slow 4G (1.6 Mbit\/s) and a 4\u00d7 slower CPU, median of 3 runs, homepage of 10. Desktop homepage LCP 1.4 s \u2192 0.8 s.<\/p>\n<p>That is the worst case. On a fast connection (50\u2013100 Mbit\/s, 22.11.2026) the homepage is visible in ~0.3 s and fully loaded in ~0.5 s on both desktop and phone.<\/p>\n<figure style=\"margin:0 auto 28px;max-width:380px;\"><video controls muted playsinline preload=\"none\" poster=\"https:\/\/coma.lv\/wp-content\/uploads\/2026\/11\/violafarma-after-mobile-poster-v3.jpg\" style=\"width:100%;height:auto;border-radius:12px;background:#111;display:block;\"><source src=\"https:\/\/coma.lv\/wp-content\/uploads\/2026\/11\/violafarma-new-site-mobile-v3.webm\" type=\"video\/webm\"\/><source src=\"https:\/\/coma.lv\/wp-content\/uploads\/2026\/11\/violafarma-new-site-mobile-v3.mp4\" type=\"video\/mp4\"\/><\/video><figcaption style=\"text-align:center;font-size:14px;color:#777;margin-top:8px;\">The new store on a phone: loading on a fast connection, catalogue, product, cart and checkout (no order is sent).<\/figcaption><\/figure>\n<h2>Before and after<\/h2>\n<figure style=\"margin:0 auto 28px;max-width:1100px;\"><video controls muted playsinline preload=\"none\" poster=\"https:\/\/coma.lv\/wp-content\/uploads\/2026\/11\/violafarma-compare-desktop-poster-v3.jpg\" style=\"width:100%;height:auto;border-radius:12px;background:#111;display:block;\"><source src=\"https:\/\/coma.lv\/wp-content\/uploads\/2026\/11\/violafarma-before-after-desktop-v3.webm\" type=\"video\/webm\"\/><source src=\"https:\/\/coma.lv\/wp-content\/uploads\/2026\/11\/violafarma-before-after-desktop-v3.mp4\" type=\"video\/mp4\"\/><\/video><figcaption style=\"text-align:center;font-size:14px;color:#777;margin-top:8px;\">The old and the new store: the same path from the homepage to the cart.<\/figcaption><\/figure>\n<div style=\"display:flex;flex-wrap:wrap;gap:20px;max-width:640px;margin:0 auto 28px;\">\n<figure style=\"flex:1 1 280px;margin:0;\"><img decoding=\"async\" src=\"https:\/\/coma.lv\/wp-content\/uploads\/2026\/11\/violafarma-old-mobile-v3.jpg\" alt=\"Old store (2025)\" loading=\"lazy\" style=\"width:100%;height:auto;border-radius:10px;border:1px solid #e5e5e5;display:block;\" title=\"\"><figcaption style=\"text-align:center;font-size:14px;color:#777;margin-top:6px;\">Old store (2025)<\/figcaption><\/figure>\n<figure style=\"flex:1 1 280px;margin:0;\"><img decoding=\"async\" src=\"https:\/\/coma.lv\/wp-content\/uploads\/2026\/11\/violafarma-new-mobile.jpg\" alt=\"New store (2026)\" loading=\"lazy\" style=\"width:100%;height:auto;border-radius:10px;border:1px solid #e5e5e5;display:block;\" title=\"\"><figcaption style=\"text-align:center;font-size:14px;color:#777;margin-top:6px;\">New store (2026)<\/figcaption><\/figure>\n<\/div>\n<h2>What Viola Farma got<\/h2>\n<p>The store now takes products from 1C, calculates promotions and VAT on its own, runs in three languages and loads faster on phones. The team changes banners, promo tiles and pages itself.<\/p>\n<p>See <a href=\"https:\/\/violafarma.lv\/en\/\" target=\"_blank\" rel=\"noopener\">violafarma.lv<\/a> and the <a href=\"https:\/\/coma.lv\/en\/portfolio-item\/viola-farma\/\">project in our portfolio<\/a>. If you need a similar store with import from an accounting system, have a look at our <a href=\"https:\/\/coma.lv\/en\/services\/e-commerce\/\">e-commerce development<\/a> on WooCommerce, Shopify and Node.js.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Viola Farma moved from an outdated WordPress store to a new WooCommerce store: products from 1C, three languages, automatic promotions and a faster mobile version.<\/p>\n","protected":false},"author":1,"featured_media":42334,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1410],"tags":[],"class_list":["post-42336","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-customer-stories"],"_links":{"self":[{"href":"https:\/\/coma.lv\/en\/wp-json\/wp\/v2\/posts\/42336","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/coma.lv\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/coma.lv\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/coma.lv\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/coma.lv\/en\/wp-json\/wp\/v2\/comments?post=42336"}],"version-history":[{"count":5,"href":"https:\/\/coma.lv\/en\/wp-json\/wp\/v2\/posts\/42336\/revisions"}],"predecessor-version":[{"id":42380,"href":"https:\/\/coma.lv\/en\/wp-json\/wp\/v2\/posts\/42336\/revisions\/42380"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/coma.lv\/en\/wp-json\/wp\/v2\/media\/42334"}],"wp:attachment":[{"href":"https:\/\/coma.lv\/en\/wp-json\/wp\/v2\/media?parent=42336"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/coma.lv\/en\/wp-json\/wp\/v2\/categories?post=42336"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/coma.lv\/en\/wp-json\/wp\/v2\/tags?post=42336"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}