View Single Post
  #1  
Old 07-13-2012, 08:32 AM
 
tartaglia tartaglia is offline
 

X-Adept
  
Join Date: May 2006
Location: Dallas, TX
Posts: 575
 

Default In-Page Anchor links for Popup Terms & Conditions in 4.5.1

Background:
Using the AJAX one page checkout in XC 4.5.1, a link is displayed to the customer to bring up the Terms & Conditions info in a popup. The code behind this link is <xcartdir>/pages.php?alias=conditions. In pages.php there is code that associates the alias "conditions" with the name of the static page which contains your terms and conditions info. (NOTE you must make sure your static page has the same name as what is in the pages.php file)

Problem:
My terms and conditions page is rather long on content (as most are) and so I had built my static page with in-page anchor links (using things like <a href="#returns"> and corresponding <a name="returns"> code) in order to allow "jumping" within the content. Although the terms and conditions page works great when called from the help section at the bottom of the store pages (<xcartdir>/terms_and_conditions.html), and the page loads fine as a popup from the AJAX OPC link, if someone clicks one of the in-page links within the popup it reloads the storefront homepage within the popup. I can see why this is happening because the in-page link inside the popup page tries to load <xcartdir>/#returns which of course is not right.

So, any suggestion on how to get in-page links working for a static page loaded as a popup from the AJAX OPC link?
__________________
David Coggan
Carolyn Nussbaum Music Company
X-Cart v4.5.4 Gold +
LiteCommerce v2.2.41 (previous 6 years)
Reply With Quote