Author Topic: "Ask a Question about this product" Displaying Blank  (Read 1915 times)

graphicdev

  • Beginner
  • *
  • Posts: 5
"Ask a Question about this product" Displaying Blank
« on: November 04, 2014, 07:22:07 am »
Hi,
I urgently need help with the "Ask a Question about this product" or "Call for Price" pop up.
Here is a link the site: http://lnxweb01.ecotechconverge.co.za/~uoas/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=122&virtuemart_category_id=22&Itemid=0&showall=1
When you click on the "Ask a Question about this product" or "Call for Price" link the contact form pops up. Once you have filled in your information and question and press send the pop up goes blank and the message does not go to the relevant email address. Attached is a screenshot.

Site Information:
Joomla: 2.5.17      Virtuemart: 2.0.26d   PHP: 5.4.31

[attachment cleanup by admin]

John2400

  • Virtuemart - the Future is ever Changing
  • Global Moderator
  • Full Member
  • *
  • Posts: 1568
  • VirtueMart Version: Use VM3.0.12
Re: "Ask a Question about this product" Displaying Blank
« Reply #1 on: November 04, 2014, 07:52:02 am »
These versions are too old. Many of these types of issues have been solved by simply updating. There have been nearly 27 updates since this version.


http://dev.virtuemart.net/projects/virtuemart/files


graphicdev

  • Beginner
  • *
  • Posts: 5
Re: "Ask a Question about this product" Displaying Blank
« Reply #2 on: November 04, 2014, 09:12:38 am »
I have done the updates as suggested. The pop still goes blank after clicking send.

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27669
  • Always on vacation
    • Jenkin Hill Internet
Re: "Ask a Question about this product" Displaying Blank
« Reply #3 on: November 04, 2014, 10:44:17 am »
Then next step is to check for 500 errors:  http://forum.virtuemart.net/index.php?topic=121692
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VM 3.6.11 10292 on Joomla 3.9.16 PHP 7.0.33

graphicdev

  • Beginner
  • *
  • Posts: 5
Re: "Ask a Question about this product" Displaying Blank
« Reply #4 on: November 05, 2014, 07:09:19 am »
I enable the vmdebug. Tried the contact form again.
Got this error:
Fatal error: Call to undefined function mb_strlen() in /home/uoas/public_html/components/com_virtuemart/controllers/productdetails.php on line 77

Any suggestions on what could cause this?

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10018
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: "Ask a Question about this product" Displaying Blank
« Reply #5 on: November 07, 2014, 13:57:18 pm »
ahh found, just use there instead of
Code: [Select]
$commentSize = mb_strlen( JRequest::getString('comment') );

this
Code: [Select]
$commentSize = JRequest::getString ('comment');
if (function_exists('mb_strlen')) {
$commentSize =  mb_strlen($commentSize);
} else {
$commentSize =  strlen($commentSize);
}
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

graphicdev

  • Beginner
  • *
  • Posts: 5
Re: "Ask a Question about this product" Displaying Blank
« Reply #6 on: November 10, 2014, 06:53:13 am »
Thank you so much.

The code I need to replace, would you confirm that I replace it in this document productdetails.php ?


graphicdev

  • Beginner
  • *
  • Posts: 5
Re: "Ask a Question about this product" Displaying Blank
« Reply #7 on: November 13, 2014, 06:57:02 am »
Thanks again. Added the suggest code and it fixed my problem.
 ;D :D ;D

guybr

  • Jr. Member
  • **
  • Posts: 154
Re: "Ask a Question about this product" Displaying Blank
« Reply #8 on: June 10, 2015, 15:44:27 pm »
Hi Milbo, I'm using VM 2.6.6 and I'm trying to duplicate the "ask a question" email in order to display it as a "make an offer" email, which would be displayed conditionally (based on custom field setting in the Admin).

I've been able to get the button to display conditionally, but in this file controllers/productdetails.php, when I try to copy-paste the section for "MailAskquestion" and change all the values for "makeoffer", I get a blank screen. The message I get is:
Parse error: syntax error, unexpected 'public' (T_PUBLIC) in /home/content/15/9930015/html/online-store/components/com_virtuemart/controllers/productdetails.php on line 157

The file has a lot of spaces between the lines, so I don't know what line 157 refers to: according to the numbering in notepad++ it refers to the line $commentSize = mb_strlen( JRequest::getString('comment') );, so I changed it with the code you proposed above - but I still get the same error.

Is it possible that I'm doing something wrong with the code by copying-pasting the "ask question" segment and simply replacing the name? I already prepared the alternate email by duplicating the "askquestion" view and altering the names and string labels, and creating replicated css in vmsite-ltr...