<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Blog — Ahmed Showky</title>
    <link>https://ahmedshowky.site/blog</link>
    <description>Practical write-ups on Shopify, Python automation, bilingual UX and the performance work behind fast stores.</description>
    <language>en</language>
    <atom:link href="https://ahmedshowky.site/feed.xml" rel="self" type="application/rss+xml"/>
    <item>
      <title>How I cut Shopify catalog updates from 8 hours to 1 with Python &amp; GraphQL</title>
      <link>https://ahmedshowky.site/blog/shopify-catalog-updates-python-graphql</link>
      <guid isPermaLink="true">https://ahmedshowky.site/blog/shopify-catalog-updates-python-graphql</guid>
      <pubDate>Wed, 14 Oct 2026 09:00:00 GMT</pubDate>
      <description>A practical look at the Python + Shopify Admin GraphQL toolkit behind bulk price, catalog and multi-branch inventory updates for a 50,000-product store.</description>
      <content:encoded><![CDATA[<p>Tawheed &amp; Nour sells more than <strong>50,000 products</strong> across many branches. Prices, stock and collections change every day — and for a long time, updating even 300 products by hand in the Shopify admin took a full working day.</p>
<p>This is how I turned that into a ~1 hour job with a small Python toolkit on top of the Shopify Admin GraphQL API.</p>
<h2 id="the-problem-with-manual-updates">The problem with manual updates</h2>
<p>Manual edits don&#39;t just cost time. They also cause:</p>
<ul>
<li><strong>Drift</strong> between the ERP (the source of truth) and the storefront</li>
<li><strong>Price and stock mistakes</strong> that customers notice before you do</li>
<li><strong>Slow campaigns</strong>, because every promotion waits for someone to edit products one by one</li>
</ul>
<h2 id="the-approach">The approach</h2>
<ol>
<li><strong>Export from the ERP</strong> as a clean CSV per branch.</li>
<li><strong>Validate</strong> every row in Python: SKU exists, price is a number, stock isn&#39;t negative.</li>
<li><strong>Batch the changes</strong> into GraphQL mutations instead of one REST call per product.</li>
<li><strong>Respect rate limits</strong> by reading the query cost Shopify returns and pausing when the bucket runs low.</li>
<li><strong>Report</strong> what changed, what was skipped, and why.</li>
</ol>
<h2 id="a-bulk-variant-update">A bulk variant update</h2>
<p>The core of the tool is one mutation that updates many variants of a product in a single request:</p>
<pre><code class="language-python">MUTATION = &#39;&#39;&#39;
mutation UpdateVariants($productId: ID!, $variants: [ProductVariantsBulkInput!]!) {
  productVariantsBulkUpdate(productId: $productId, variants: $variants) {
    userErrors { field message }
  }
}
&#39;&#39;&#39;

def update_variants(session, product_id, variants):
    response = session.post(GRAPHQL_URL, json={
        &quot;query&quot;: MUTATION,
        &quot;variables&quot;: {&quot;productId&quot;: product_id, &quot;variants&quot;: variants},
    })
    response.raise_for_status()
    errors = response.json()[&quot;data&quot;][&quot;productVariantsBulkUpdate&quot;][&quot;userErrors&quot;]
    return errors
</code></pre>
<h2 id="results">Results</h2>
<blockquote>
<p>A 300-product update went from a full working day (about 8 hours) to roughly one hour — and the same scripts now power inventory sync across branches.</p>
</blockquote>
<p>Just as important, the team trusts the numbers again. Every run leaves a report, so mistakes are caught before customers see them.</p>
<h2 id="what-id-tell-any-growing-store">What I&#39;d tell any growing store</h2>
<ul>
<li>Treat your ERP or spreadsheet as the <strong>single source of truth</strong> and sync <em>from</em> it.</li>
<li>Automate the boring 80% first. You don&#39;t need a giant app, just a few reliable scripts.</li>
<li>Add <strong>QA checks</strong> (broken links, price or stock gaps) next to the sync. That&#39;s where the real time savings are.</li>
</ul>
]]></content:encoded>
      <category>Shopify</category>
      <category>Python</category>
      <category>Automation</category>
    </item>
    <item>
      <title>Building bilingual Arabic / English storefronts: 7 RTL lessons</title>
      <link>https://ahmedshowky.site/blog/bilingual-arabic-english-storefronts-rtl</link>
      <guid isPermaLink="true">https://ahmedshowky.site/blog/bilingual-arabic-english-storefronts-rtl</guid>
      <pubDate>Wed, 02 Sep 2026 09:00:00 GMT</pubDate>
      <description>Right-to-left is more than flipping text. Fonts, logical CSS, icons, search and hreflang — the lessons from building stores for Arabic and English customers.</description>
      <content:encoded><![CDATA[<p>Most of the stores I build serve customers in <strong>both Arabic and English</strong>. Getting right-to-left (RTL) right is much more than flipping text direction. Here are the lessons I wish I&#39;d known on day one.</p>
<h2 id="1-set-dir-and-lang-on-the-root">1. Set <code>dir</code> and <code>lang</code> on the root</h2>
<p>Put <code>lang=&quot;ar&quot; dir=&quot;rtl&quot;</code> on <code>&lt;html&gt;</code> for Arabic pages. Browsers, screen readers and search engines all rely on it.</p>
<h2 id="2-use-logical-css-properties">2. Use logical CSS properties</h2>
<p>Replace <code>margin-left</code> with <code>margin-inline-start</code>, and <code>left</code> with <code>inset-inline-start</code>. Your layout then mirrors automatically:</p>
<pre><code class="language-css">.card {
  padding-inline: 1.5rem;
  border-inline-start: 3px solid var(--accent);
}
</code></pre>
<h2 id="3-pick-arabic-fonts-on-purpose">3. Pick Arabic fonts on purpose</h2>
<p>Latin fonts don&#39;t include Arabic letters, so the browser falls back to whatever it finds. Choose an Arabic family that matches your brand&#39;s weight and tone, and list it right after your Latin font.</p>
<h2 id="4-never-add-letter-spacing-to-arabic">4. Never add letter-spacing to Arabic</h2>
<p>Arabic letters connect. Tracking breaks those joins and makes words hard to read. Reset <code>letter-spacing</code> for RTL.</p>
<h2 id="5-flip-directional-icons-not-every-icon">5. Flip directional icons, not every icon</h2>
<p>Arrows and &quot;next&quot; chevrons should mirror. Logos, play buttons and checkmarks should not.</p>
<h2 id="6-plan-search-and-filters-for-both-languages">6. Plan search and filters for both languages</h2>
<p>Product titles, collection names and filter values need translations too. Otherwise, half your customers can&#39;t find anything.</p>
<h2 id="7-tell-google-about-both-versions">7. Tell Google about both versions</h2>
<p>Give each language its own URL, link them with <code>hreflang</code>, and add a matching canonical tag to each page. That way, each audience lands on the right version.</p>
<hr>
<p>Bilingual UX is a competitive edge in our region. Done well, customers simply feel at home.</p>
]]></content:encoded>
      <category>RTL</category>
      <category>UX</category>
      <category>Shopify</category>
    </item>
  </channel>
</rss>
