News:

Support the VirtueMart project and become a member

Main Menu

"Ask a Question about this product" Displaying Blank

Started by graphicdev, November 04, 2014, 07:22:07 AM

Previous topic - Next topic

graphicdev

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

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

I have done the updates as suggested. The pop still goes blank after clicking send.

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

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

graphicdev

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

ahh found, just use there instead of

$commentSize = mb_strlen( JRequest::getString('comment') );


this

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

graphicdev

Thank you so much.

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


graphicdev

Thanks again. Added the suggest code and it fixed my problem.
;D :D ;D

guybr

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...