Jump to content

Homepage 'Add to Basket' Button Takes you to Frontpage


YnZs

Recommended Posts

Hello Everyone!

Version: 6.0.9
Skin: Mauris with a few tweaks

I started noticing a few weeks ago, that the "Image" at the top center of the store (that appears on all pages) takes you to what I will refer as my 'Front Page'
    I'll elaborate, website is www.MyWebSite.com, to access the store it's www.MyWebSite.com/index.php
    So you're poking around the store looking at all the goodies, then go up and click on the image, it takes you to www.MyWebSite.com
     instead of www.MyWebSite.com/index.php
I can't figure out how to fix/change this, but I think it's odd and it should just take you back to the cart's 'Homepage'

A few days ago, I was doing some testing as I hadn't received any orders in awhile, I went to my 'Homepage' @ www.MyWebSite.com/index.php
and clicked on a random 'Add to Basket' of an item, to my surprise, it took me to my 'Frontpage' www.MyWebSite.com.
     As a quick fix I attempted to just REMOVE completely the 'Add to Basket' button as maybe this is known issue and will be fixed in a patch and
     with my VERY basic coding skills, removed it, but it left a funny looking   |   below the price of the item, so I reverted everything back....

Today, I decided I was going to switch to another skin, see if all the buttons and everything worked correctly elsewhere, as maybe there is something
I have done.  I have the "Allow Customer to Change Skins" option set to YES, but something funny happens when I go to www.MyWebSite.com/index.php
and it attempts to load another skin.....
             It DOES NOT load a NEW skin NOR does it load the 'Homepage'! It takes me to my 'Frontpage' @ www.MyWebSite.com!!

As part of testing, I did go into my Admin side and changed the skin to a few different types (Foundation, Crosshatch, etc) and I'm having relatively the
same problems... 'Add to Basket' takes you to 'Frontpage'... or even somehow manages to load the 'Frontpage' into a box on the 'Homepage'

I do run 2 other online stores, they don't seem to be having any of these issues, so I'm sure it's something I have done.
Though, the 2 other stores are running:
     Version: 5.2.4
     Version: 5.2.14

Link to comment
Share on other sites

I hear you say that www.example.com takes you to a page you own (your "Frontpage") but not to your CubeCart's "Homepage".

However, www.example.com/index.php will take you to your CubeCart's "Homepage".

This tells me the hosting environment for this site has a web server that is configured with a "default document list" where there is a name of a file in that list that is listed before index.php (thus, a higher priority), and that this file does exist.

In a URL, not having specified an actual document to view (e.g., /index.php), the web server must look to its "default document list". It will serve the first found document in that list.

Therefore, if index.html is earlier in the list than index.php, and index.html actually exists, then index.html is what will be served.

The programming in CubeCart is not as strict as some would like, hence, many URLs found in CubeCart pages do not include the /index.php part.

That leaves you in a quandary. Do you keep the "Frontpage", or abandon it by making index.php in the "default document list" in the web server configuration have a higher priority. Or you can delete/rename the index.html document.

Link to comment
Share on other sites

6 minutes ago, bsmither said:

Therefore, if index.html is earlier in the list than index.php, and index.html actually exists, then index.html is what will be served.

What would be the harm in switching them? Other than www.MyWebSite.com instantly going to the Cart's 'Homepage' instead of my company's "Frontpage'?
    I'll give it a shot, I'll see what happens

HTACCESS.JPG


That's exactly what I did and that's exactly what happened, when I hit the refresh button on my 'Frontpage' it loaded the online store.

Maybe I should just register another domain name? Also, my store doesn't have it's own folder... that was my mistake from way back
in the day, would there be any hope at all the would work?

Link to comment
Share on other sites

So here's what I did:

went into the file management of my website host provider (Bluehost.com)
Created a folder under the public_html called "mywebsitestore"
Found the area where you can create sub-domains and made 'store.MyWebSite.com' and had it point to the
     folder public_html/mywebsitestore
Found a list of all CubeCart's Files and folders and COPIED them (not move) to public_html/mywebsitestore
Went to the browser and typed in store.MyWebSite.com, everything seems to work and the errors are gone
Went to the area where website host provider has a record for where CubeCart originally installed and changed it
     to the new folder public_html/mywebsitestore

So far so good, haven't found any issues yet, but, I'm going to keep the old install around for awhile to make sure it works

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...