Add to cart w popup notice fails after going live

  • Posts: 22
  • Thank you received: 2
10 years 6 months ago #181927

-- HikaShop version -- : 2.3.4
-- Joomla version -- : 2.5.27
-- PHP version -- : 5.5
-- Browser(s) name and version -- : ie 11 and chrome 38.0.2
-- Error-message(debug-mod must be tuned on) -- : none (404)

I've had to make it just stay on the same page, the site was developed under the subfolder "newsiteV2", but now that function of adding to the cart and using the popup notice for items successfully added to cart uses that "newsiteV2" string in the path still even though the rest of the site (including hikashop links etc) does not.

In other words, the domain WAS www.mysite.com/newsiteV2 for development purposes. Now, I've made it the primary domain of www.mysite.com , and all works well. BUT, the popup notice will go to a 404 error for the whole page because it's keeping the "newsiteV2" in the url string.

Please help, that's a cool part of the UI/UX that I want to keep but I don't really know where that would be hard coded in??

ETA: this is definitely a joomla native SEO friendly thing. I've looked in the .htaccess file for a rewrite or something that would cause the old path to keeping showing up in Hikashop links, but it's not coming from Joomla. Where would you guys store that path that's NOT relative to the index page itself and instead reads the path above the index.php file?

That's the only reason making the change and moving the directory of the site would cause issues is if something inside the Hika code - when using Joomla's native SEO links functionality - is hard coding the original path when you create/install?

Last edit: 10 years 6 months ago by newmandoesit. Reason: More Info.

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

  • Posts: 12953
  • Thank you received: 1778
10 years 6 months ago #181994

The code of the add to cart popup is on the "notice" file of the "product" view of your front-end template, and you can edit it via "Hikashop->Display->Views".
That code is displaying the "proceed to checkout" button :

    echo $this->cartClass->displayButton(JText::_('PROCEED_TO_CHECKOUT'),'to_checkout',$this->params,$url_checkout,'window.top.location=\''.$url_checkout.'\';return false;','id="hikashop_add_to_cart_checkout_button"'); ?>

The path is not hard coded or stored in HikaShop.
HikaShop uses the live_site parameter of the Joomla configuration. So if you changed the URL of your website but didn't update the live_site parameter of the Joomla configuration file, you might get that problem.
Another possibility is that you have a third party SEF system caching the SEFed URLs and thus you don't see the change after changing the website URL but it doesn't seem to be the case here.

Last edit: 10 years 6 months ago by nicolas.

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

  • Posts: 22
  • Thank you received: 2
10 years 6 months ago #182014

That is it a possibility for two reasons: first I checked the config file manually and the live site variable is actually left blank to avoid this kind of confusion, and second if that want any part of the problem SEF links be enabled would mess up all of the other native Joomla! menu links on the site.

When everything is working correctly except being able to add to cart... Basic troubleshooting 101 would tell you that Hika is the problem.

Where does Hika cache it's URL information? that is where I would start looking

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

  • Posts: 83933
  • Thank you received: 13588
  • MODERATOR
10 years 6 months ago #182024

That's the thing... HikaShop doesn't cache URLs.
The only place were there are URLs are in the "canonical URL" fields of the products and categories, or in the settings of the payment methods, and a few settings of the configuration. All of them are normally configured by yourself (so you should already know about them) and they all support relative URLs (so that you don't need to enter the full path (and thus not have such issue when changing the website location).

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

  • Posts: 22
  • Thank you received: 2
10 years 6 months ago #182126

Would you be willing to take a look then? I can give you super user access. As of now, I've just disable SEF links which completely fixes the issue.

The reason it has to be something with hika is simple: all the other links work fine, including the hikashop menu links, when SEF links are enabled. ONLY the "add to cart" function hits a 404 error because the URL it tries to load has the old path in it. This path wasn't hard coded anywhere on the site at all, and it's not in the .htaccess file, or the configuration.php file - so I don't really know what to look at.

I've modified quite a few of the views, and they're now in the HTML override folder of my template. Is it possible that when this happens, Hika keeps a record of the path to the html overrides somewhere, or the template itself is keeping that path? If so, where do I go to fix this? I've cleared the site cache under maintenance, but no effect?

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

  • Posts: 83933
  • Thank you received: 13588
  • MODERATOR
10 years 6 months ago #182203

Hi,

If it's only the add to cart button causing that 404 error then it could be:
1. as you said, a view override could be the cause. To check that, rename the folder template/YOUR_TEMPLATE/html/com_hikashop via FTP and that will deactivate all the view overrides. You'll see if it helps or not.
2. the live site of the configuration.php could be the issue
3. the "force menu on checkout" option of the HikaShop configuration could link to a menu item which link to the old website.

I don't see anything else.

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

  • Posts: 22
  • Thank you received: 2
10 years 6 months ago #182287

Ok, so throw me a bone, how would a view override make the URL upon form submission? There isn't any hard code of the old location's pathway in those... is there?

I KNOW with 1000% certainty that it isn't the config file with the livesite variable.

And the force menu on checkout option is set to "None".

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

  • Posts: 13201
  • Thank you received: 2322
10 years 4 months ago #187454

Hi,

Sorry for the very late reply. Do you have solved your issue ?
If not, please try to update to HikaShop 2.3.5 and try to set a menu for the option "force menu on checkout", a valid menu of the new site.

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

Time to create page: 0.086 seconds
Powered by Kunena Forum
loading