X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Help: Pupup window not opening for "Ask a question about" link (https://forum.x-cart.com/showthread.php?t=74650)

anandat 11-10-2016 12:11 AM

Help: Pupup window not opening for "Ask a question about" link
 
Hello,
I am trying add link "Ask a question about this product" in my mobile skin template.

I added following code in product_details.tpl in mobile skin template.
HTML Code:

<div class="ask-question">
      {include file="customer/buttons/button.tpl" button_title=$lng.lbl_ask_question_about_product style="link" href="javascript: return !popupOpen(xcart_web_dir + '/popup_ask.php?productid=`$product.productid`')"}
    </div>

The link is appearing on product page now but it's not opening the popup window :(

is there any javacript code needs to be apply before </head> ?
Bcoz google chrome console display following error

HTML Code:

Uncaught ReferenceError: popupOpen is not defined
    at HTMLAnchorElement.onclick


cflsystems 11-10-2016 08:40 AM

Re: Help: Pupup window not opening for "Ask a question about" link
 
There is. Most likely your mobile skin is not loading some js files.
However you may think twice before having any popups on mobile - Google will start penalizing for those

anandat 11-11-2016 05:17 AM

Re: Help: Pupup window not opening for "Ask a question about" link
 
Thanks Steve for good tip.
Now decided to go with normal link instead of popup link.
So I changed the code to following
HTML Code:

<div class="ask-question">
      {include file="customer/buttons/button.tpl" button_title=$lng.lbl_ask_question_about_product style="link" href="xcart_web_dir + /popup_ask.php?productid=`$product.productid`"}
    </div>

But now problem is with captcha.
Even I enter correct captcha numbers but form is still ask to enter correct captcha details again & again.

Is there any way to remove captcha requirement code from pop_ask.php ?

Or other way is to display content of popup_ask.php?productid=`$product.productid` directly into product detail page..but how to achieve that ?:(

cflsystems 11-11-2016 09:03 AM

Re: Help: Pupup window not opening for "Ask a question about" link
 
Well popup_ask.php is designed to work in a popup so this may be part of the problem, having it load on it's own page. You can turn off the captcha from admin modules - image verification

To incorporate it on the product page will require changes to few files. Not something that can be easily posted here. If you want to have it this way and need help with integration contact me and I can look into it for you.


All times are GMT -8. The time now is 09:16 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.