Hi all.
I have a modx site already, which I want to add an online store to.
I have used ECWID in the past, which is a really good cost-effective platform.
But for some reason, MODX is throwing out the redirect rules, so it won’t work.
This is the code they suggest adding to the htaccess file:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^shop/.*$ shop,html
</IfModule>
Amd this is the ECWID integration code:
<script>
window.ec = window.ec || {};
window.ec.config = window.ec.config || {};
window.ec.config.storefrontUrls = window.ec.config.storefrontUrls || {};
window.ec.config.storefrontUrls.cleanUrls = true;
window.ec.config.baseUrl = '/shop';
</script>
<div id="my-store-76255255"></div>
<div>
<script data-cfasync="false" type="text/javascript" src="https://app.ecwid.com/script.js?XXXXXXXX&data_platform=code&data_date=2022-06-27" charset="utf-8"></script><script type="text/javascript"> xProductBrowser("categoriesPerRow=3","views=grid(20,3) list(60) table(60)","categoryView=grid","searchView=list","id=my-store-XXXXXXXX");</script>
</div>
This works as a static html file outside of modx (but in the same directory as modx)
but I can’t use the above in MODX, because my site doesn’t use .html extensions (it just uses ‘/’),
So I changed the .htaccess to:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^shop/.*$ shop
</IfModule>
And what happens is the page loads when I preview it in Modx - but when I try to reload the page, it throws a 404.
I guess it’s hard to explain the issue if you haven’t used ECWID before, but their support hasn’t come up with any solutions so wondered if anyone here knows what do to.
Sorry for the vagueness! Not sure how else to explain it.
Thanks in advance!