Hikashop Not Working with Simple SEF/Rewrite Rule

  • Posts: 3
  • Thank you received: 0
12 years 9 months ago #38880

I've tried going through support but it's been a week now and still no resolution. It takes a long, long time to get any response from support.

My shopping cart's State dropdown field is not working and it is entirely due to using SEF URLs in Joomla.

Evidently Hikashop doesn't support simple, standard rewrite rules.

IterationLimit 10

MaxMatchCount 10

RewriteCond %{HTTP_URL} (/[^.]*|\.(html?|php)|!administrator)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) /index.php [U,L]

This causes the URL /store/checkout/state/tmpl-component.html?field_type=address&field_namekey=address_state&namekey=country_United_States_of_America_223 to NOT work.

If the URL used is /store/checkout/state/?field_type=address&field_namekey=address_state&namekey=country_United_States_of_America_223 it DOES work but there doesn't seem to be any way to get Hikashop to use this instead.

I'm not having any problems with my Joomla site or any of my other third party components. They all work well with this rule.

Does anyone have an example rule that actually works with Hikashop or can someone point me in the right direction?

Thanks.

Please Log in or Create an account to join the conversation.

  • Posts: 3
  • Thank you received: 0
12 years 9 months ago #38913

Ok I figured it out on my own after trial and error and discussions with another person...

The above rewrite rule example is from Joomla.org:

docs.joomla.org/Enabling_Search_Engine_F...EF)_URLs_on_IIS/IIS6

It does NOT work with Hikashop. Instead, I used this which fixed SEF URLs:

IterationLimit 10

MaxMatchCount 10

RewriteCond %{HTTP_URL} ([a-zA-Z0-9\-]+\.html|[a-zA-Z0-9\-]+\.php)|!administrator)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) /index.php [U,L]

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 9 months ago #38917

Hi,

Well that explains why it didn't work. Indeed, if you change the default htaccess of joomla that can have consequences on SEF and thus break stuff.

Thank you for posting the solution. I'm sure it will help others with the same problem on IIS with that htaccess modification implemented.

Please Log in or Create an account to join the conversation.

  • Posts: 3
  • Thank you received: 0
12 years 9 months ago #39013

nicolas wrote: Hi,

Well that explains why it didn't work. Indeed, if you change the default htaccess of joomla that can have consequences on SEF and thus break stuff.

Thank you for posting the solution. I'm sure it will help others with the same problem on IIS with that htaccess modification implemented.


I didn't touch htaccess... This is an IIS/Windows box and it doesn't use htaccess. I'm using IIRF which is an ISAPI rewrite module for IIS. I created my rewrite rules config file from scratch using the example on Joomla's web site.

The issue is that what is considered valid rewrite rules by the Joomla developers is NOT working with Hikashop.

I would think this has to do with Hikashop using tmpl-component.php instead of what the Joomla default is... No other extensions or modules have this problem.

I'm not trying to badmouth Hikashop...to the contrary I like it a lot so far.

However, this issue should be apparent and publicised and/or fixed by Hikashop development because if you Google it, lots of people have had this problem with no apparent resolution except to turn off SEF URLs. This shouldn't be a requirement to use this shopping cart...or any shopping cart for that matter.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 9 months ago #39115

The tmpl=component parameter used by HikaShop is a standard parameter of Joomla in order to display a page without the template (menus, modules, etc) around main area of the page.
HikaShop uses it a lot for popups which not many extensions use.

Also, on most websites, even with SEF turned on, that parameter is not a problem and it works fine. I don't think that there is anything we can do in HikaShop to avoid the problem, except change all the views where we use that parameter to not use it anymore. That's definitely not a small task.

As you're saying, I think that it's a good idea to add that to the compatibility documentation we have so that other users can easily find it if they have the same problem. We'll do that.

Please Log in or Create an account to join the conversation.

Time to create page: 0.052 seconds
Powered by Kunena Forum