Author Topic: [SOLVED] On Test Site, Cart Redirects to Live Site  (Read 3219 times)

kden

  • Beginner
  • *
  • Posts: 41
  • VirtueMart Version: 2.0.20
[SOLVED] On Test Site, Cart Redirects to Live Site
« on: May 05, 2016, 15:50:06 pm »
Joomla 3.5.1
Virtuemart 3.0.16
Php 5.5.35

I'm sure I have seen a solution for this issue before but I have been searching and cannot find it.
I've created a test site with Akeeba Kickstart to update joomla and a shipping component and hopefully fix an issue I've been having with not receiving emails. After fixing a few small issues the test site is running great until I go to the cart page. I can add products to the cart, but when I click to See the Cart, I am redirected to the live site with an empty cart.

I've really only seen a solution like detailed at the akeeba backup support but that does not apply to this version of joomla/virtuemart. I've searched through the other files in that folder and am not seeing anything that stores the url. https://www.akeebabackup.com/documentation/troubleshooter/prvirtuemart.html

I would just leave it and assume it will work fine when I bring the site live, except that I need to make sure the order email issue got fixed meaning I need to see the cart page and process test orders. Does anybody know how to fix the redirect?

Link to test site: http://www.testsite.a1securitybars.com/product-catalog

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10416
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: On Test Site, Cart Redirects to Live Site
« Reply #1 on: May 05, 2016, 15:54:23 pm »
from the popup I go to the cart at

https://www.testsite.a1securitybars.com/index.php?option=com_virtuemart&view=cart

also from the cart module and the shop carts left menu

except the cert isn't valid
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

kden

  • Beginner
  • *
  • Posts: 41
  • VirtueMart Version: 2.0.20
Re: On Test Site, Cart Redirects to Live Site
« Reply #2 on: May 05, 2016, 16:13:37 pm »
The certificate is valid for the live site so I am not worried about that, I will try a different browser and see if that makes the difference. Not sure why I am redirecting, but it must just be my computer and maybe not an issue, thank you for taking a look!

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10416
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: On Test Site, Cart Redirects to Live Site
« Reply #3 on: May 05, 2016, 18:53:06 pm »
but the point is I aren't redirected....
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

kden

  • Beginner
  • *
  • Posts: 41
  • VirtueMart Version: 2.0.20
Re: On Test Site, Cart Redirects to Live Site
« Reply #4 on: May 05, 2016, 19:58:41 pm »
Yes that is good news except I cannot duplicate it. I can't even get anything to add to the cart anymore.

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10416
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: On Test Site, Cart Redirects to Live Site
« Reply #5 on: May 05, 2016, 20:32:39 pm »
clear browser caches etc etc
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

kden

  • Beginner
  • *
  • Posts: 41
  • VirtueMart Version: 2.0.20
Re: On Test Site, Cart Redirects to Live Site
« Reply #6 on: May 05, 2016, 21:16:16 pm »
Yes, thank you. I have already cleared joomla cache, cleared browser history and cache. Am unable to add to cart now. Not sure if it is working for other people to try. Add to cart had been working (up to being redirected when accessing cart page) until I cleared things. Trying on both Firefox and Safari on my mac and Firefox on a PC in the office.
Error Logs are not showing anything.
When I try to directly go to the cart using either testsite.a1securitybars.com/product-catalog/cart or https://www.testsite.a1securitybars.com/index.php?option=com_virtuemart&view=cart I am redirected to https://www.sternmastermarine.com/index.php?option=com_virtuemart&view=cart

Does virtuemart somewhere store a redirect? I cleared all redirects out of my .htaccess file when I made the test site. Does the certificate effect the site redirecting?

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10416
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: On Test Site, Cart Redirects to Live Site
« Reply #7 on: May 05, 2016, 23:59:22 pm »
you have a redirect at server level somewhere..

even  https://www.testsite.a1securitybars.com is now a 301 to http://www.sternmastermarine.com/

HTTP/1.1 301 Moved Permanently
Date: Thu, 05 May 2016 21:56:14 GMT
Server: Apache
Location: http://www.sternmastermarine.com/
Cache-Control: max-age=1
Expires: Thu, 05 May 2016 21:56:15 GMT
Content-Length: 241
Keep-Alive: timeout=3, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=iso-8859-1

GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

kden

  • Beginner
  • *
  • Posts: 41
  • VirtueMart Version: 2.0.20
Re: On Test Site, Cart Redirects to Live Site
« Reply #8 on: May 06, 2016, 15:08:45 pm »
Severe duh moment for me. I needed to uncheck Enable SSL certificate from the VM shop configuration. I did not realize a subdomain wouldn't work with that enabled. Thanks for making the comment about the certificate, took me awhile but that's how I solved it. The 301 redirect was leftover in the .htaccess and removed, I think it did not save when I initially changed it.