Author Topic: Call to undefined method VirtuemartViewUser::vmValidator  (Read 1784 times)

barbara

  • Jr. Member
  • **
  • Posts: 145
Call to undefined method VirtuemartViewUser::vmValidator
« on: October 09, 2018, 23:24:17 pm »
just upgraded to joomla 3.8.13 / vm 3.4.2.9966

when in the cart if I go to edit the shipping / billing or add oa new I I am sent to page mywebsite.com/vm/user/editaddresscartBT where I get an error

 '0 - Call to undefined method VirtuemartViewUser::vmValidator()'

any suggestions on how I can fix this would be greatly appreciated

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8837
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: Call to undefined method VirtuemartViewUser::vmValidator
« Reply #1 on: October 10, 2018, 00:21:46 am »
prob out of date template

open   templates\your template\html\com_virtuemart\user\edit_address.php

and see if you have

 vmJsApi::vmValidator();

maybe also here is   $this->vmValidator(); etc get rid of those

if template is old perhaps also u need to replace

JHtml::stylesheet ('vmpanels.css', JURI::root () . 'components/com_virtuemart/assets/css/');

with


vmJsApi::css('vmpanels');
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

barbara

  • Jr. Member
  • **
  • Posts: 145
Re: Call to undefined method VirtuemartViewUser::vmValidator
« Reply #2 on: October 10, 2018, 18:35:58 pm »
BINGO!!!!

thank you so much!

RobertL

  • Beginner
  • *
  • Posts: 44
Re: Call to undefined method VirtuemartViewUser::vmValidator
« Reply #3 on: October 11, 2018, 18:46:26 pm »
Good stuff. Just had the issue and solved in 2 minutes.

thanks

alloret

  • Beginner
  • *
  • Posts: 7
Re: Call to undefined method VirtuemartViewUser::vmValidator
« Reply #4 on: January 25, 2019, 11:29:28 am »
Hi!
I have same problem.
I just done the correction on my edit_address.php file but I still have the Error Call to a member function getCode() on null: Call to undefined method VirtuemartViewUser::vmValidator()
This is my edit_address.php code now:
Code: [Select]
<?php
/**
 *
 * Enter address data for the cart, when anonymous users checkout
 *
 * @package    VirtueMart
 * @subpackage User
 * @author Oscar van Eijk, Max Milbers
 * @link http://www.virtuemart.net
 * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved.
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
 * VirtueMart is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 * @version $Id: edit_address.php 8565 2014-11-12 18:26:14Z Milbo $
 */
// Check to ensure this file is included in Joomla!
defined ('_JEXEC') or die('Restricted access');

// Implement Joomla's form validation
JHtml::('behavior.formvalidation');
JHtml::_('formbehavior.chosen''.vm-chzn-select');
vmJsApi::css('vmpanels');

?>

<?php
if (!class_exists('VirtueMartCart')) require(VMPATH_SITE DS 'helpers' DS 'cart.php');
$this->cart VirtueMartCart::getCart();
$url 0;
if (
$this->cart->_fromCart or $this->cart->getInCheckOut()) {
$rview 'cart';
}
else {
$rview 'user';
}

$task '';
if (
$this->cart->getInCheckOut()){
//$task = '&task=checkout';
}
$url JRoute::('index.php?option=com_virtuemart&view='.$rview.$task$this->useXHTML$this->useSSL);

echo 
shopFunctionsF::getLoginForm (TRUEFALSE$url);

//$this->vmValidator();
?>


<form method="post" id="userForm" name="userForm" class="form-validate layout_edit_address" action="<?php echo JRoute::_('index.php?option=com_virtuemart&view=user',$this->useXHTML,$this->useSSL?>" >
<fieldset>
<h2><?php
if ($this->address_type == 'BT') {
echo vmText::('COM_VIRTUEMART_USER_FORM_EDIT_BILLTO_LBL');
}
else {
echo vmText::('COM_VIRTUEMART_USER_FORM_ADD_SHIPTO_LBL');
}
?>

</h2>

<!--<form method="post" id="userForm" name="userForm" action="<?php echo JRoute::('index.php'); ?>" class="form-validate">-->
<div class="control-buttons">
<?php
if ($this->cart->getInCheckOut() || $this->address_type == 'ST') {
$buttonclass 'btn btn-default btn-outline';
}
else {
$buttonclass 'btn btn-primary btn-outline';
}


if (VmConfig::get ('oncheckout_show_register'1) && $this->userDetails->JUser->id == && !VmConfig::get ('oncheckout_only_registered'0) && $this->address_type == 'BT' and $rview == 'cart') {
echo '<div id="reg_text">'.vmText::sprintf ('COM_VIRTUEMART_ONCHECKOUT_DEFAULT_TEXT_REGISTER'vmText::('COM_VIRTUEMART_REGISTER_AND_CHECKOUT'), vmText::('COM_VIRTUEMART_CHECKOUT_AS_GUEST')).'</div>'; }
else {
//echo vmText::_('COM_VIRTUEMART_REGISTER_ACCOUNT');
}
if (VmConfig::get ('oncheckout_show_register'1) && $this->userDetails->JUser->id == && $this->address_type == 'BT' and $rview == 'cart') {
?>

<button  name="register" class="<?php echo $buttonclass ?> btn" type="submit" onclick="javascript:return myValidator(userForm,true);"
title="<?php echo vmText::('COM_VIRTUEMART_REGISTER_AND_CHECKOUT'); ?>"><?php echo vmText::('COM_VIRTUEMART_REGISTER_AND_CHECKOUT'); ?></button>
<?php if (!VmConfig::get ('oncheckout_only_registered'0)) { ?>
<button name="save" class="<?php echo $buttonclass ?> btn" title="<?php echo vmText::('COM_VIRTUEMART_CHECKOUT_AS_GUEST'); ?>" type="submit"
onclick="javascript:return myValidator(userForm, false);"><?php echo vmText::('COM_VIRTUEMART_CHECKOUT_AS_GUEST'); ?></button>
<?php ?>
<button class="btn btn-default btn-outline" type="reset"
onclick="window.location.href='<?php echo JRoute::('index.php?option=com_virtuemart&view=' $rview.'&task=cancel'); ?>'"><?php echo vmText::('COM_VIRTUEMART_CANCEL'); ?></button>
<?php
}
else {
?>

<button class="btn btn-primary btn-outline" type="submit"
onclick="javascript:return myValidator(userForm,true);"><?php echo vmText::('COM_VIRTUEMART_SAVE'); ?></button>
<button class="btn btn-default btn-outline" type="reset"
onclick="window.location.href='<?php echo JRoute::('index.php?option=com_virtuemart&view=' $rview.'&task=cancel'); ?>'"><?php echo vmText::('COM_VIRTUEMART_CANCEL'); ?></button>
<?php ?>
</div>
<?php // captcha addition
if(VmConfig::get ('reg_captcha')){
JHTML::_('behavior.framework');
JPluginHelper::importPlugin('captcha');
$captcha_visible vRequest::getVar('captcha');
$dispatcher JDispatcher::getInstance(); $dispatcher->trigger('onInit','dynamic_recaptcha_1');
$hide_captcha = (VmConfig::get ('oncheckout_only_registered') or $captcha_visible) ? '' 'style="display: none;"';
?>

<fieldset id="recaptcha_wrapper" <?php echo $hide_captcha ?> class="featured-box">
<?php if(!VmConfig::get ('oncheckout_only_registered')) { ?>
<h3><?php echo vmText::('COM_VIRTUEMART_USER_FORM_CAPTCHA'); ?></h3>
<?php ?>
<div id="dynamic_recaptcha_1"></div>
</fieldset>
<?php 
// end of captcha addition
?>
   


<?php 
if (!class_exists ('VirtueMartCart')) {
require(VMPATH_SITE DS 'helpers' DS 'cart.php');
}

if (count ($this->userFields['functions']) > 0) {
echo '<script language="javascript">' "\n";
echo join ("\n"$this->userFields['functions']);
echo '</script>' "\n";
}

echo $this->loadTemplate ('userfields');

if ($this->userDetails->JUser->get ('id')) {
echo $this->loadTemplate ('addshipto');
?>

   
<input type="hidden" name="option" value="com_virtuemart"/>
<input type="hidden" name="view" value="user"/>
<input type="hidden" name="controller" value="user"/>
<input type="hidden" name="task" value="saveUser"/>
<input type="hidden" name="layout" value="<?php echo $this->getLayout (); ?>"/>
<input type="hidden" name="address_type" value="<?php echo $this->address_type?>"/>
<?php if (!empty($this->virtuemart_userinfo_id)) {
echo '<input type="hidden" name="shipto_virtuemart_userinfo_id" value="' . (int)$this->virtuemart_userinfo_id '" />';
}
echo JHtml::('form.token');
?>


</fieldset>
</form>


Can you help me please??
thanks!!
Angela

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8837
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: Call to undefined method VirtuemartViewUser::vmValidator
« Reply #5 on: January 25, 2019, 11:45:55 am »
as my post says....  where is your

vmJsApi::vmValidator();
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

alloret

  • Beginner
  • *
  • Posts: 7
Re: Call to undefined method VirtuemartViewUser::vmValidator
« Reply #6 on: January 25, 2019, 12:05:10 pm »
Hi GJC Web Design!
Thanks for your answer.

Can you tell me where do I have to put the code vmJsApi::vmValidator(); in edit_address.php file?

Thank you again!
Angela

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8837
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: Call to undefined method VirtuemartViewUser::vmValidator
« Reply #7 on: January 25, 2019, 17:18:00 pm »
straight after 

vmJsApi::css('vmpanels');
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

alloret

  • Beginner
  • *
  • Posts: 7
Re: Call to undefined method VirtuemartViewUser::vmValidator
« Reply #8 on: January 26, 2019, 09:12:30 am »
Hi GJC Web Design!

This is my code now:
Code: [Select]
<?php
/**
 *
 * Enter address data for the cart, when anonymous users checkout
 *
 * @package    VirtueMart
 * @subpackage User
 * @author Oscar van Eijk, Max Milbers
 * @link http://www.virtuemart.net
 * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved.
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
 * VirtueMart is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 * @version $Id: edit_address.php 8565 2014-11-12 18:26:14Z Milbo $
 */
// Check to ensure this file is included in Joomla!
defined ('_JEXEC') or die('Restricted access');

// Implement Joomla's form validation
JHtml::('behavior.formvalidation');
JHtml::_('formbehavior.chosen''.vm-chzn-select');
vmJsApi::css('vmpanels');
vmJsApi::vmValidator();

?>

<?php
if (!class_exists('VirtueMartCart')) require(VMPATH_SITE DS 'helpers' DS 'cart.php');
$this->cart VirtueMartCart::getCart();
$url 0;
if (
$this->cart->_fromCart or $this->cart->getInCheckOut()) {
$rview 'cart';
}
else {
$rview 'user';
}

$task '';
if (
$this->cart->getInCheckOut()){
//$task = '&task=checkout';
}
$url JRoute::('index.php?option=com_virtuemart&view='.$rview.$task$this->useXHTML$this->useSSL);

echo 
shopFunctionsF::getLoginForm (TRUEFALSE$url);

//$this->vmValidator();

?>


<form method="post" id="userForm" name="userForm" class="form-validate layout_edit_address" action="<?php echo JRoute::_('index.php?option=com_virtuemart&view=user',$this->useXHTML,$this->useSSL?>" >
<fieldset>
<h2><?php
if ($this->address_type == 'BT') {
echo vmText::('COM_VIRTUEMART_USER_FORM_EDIT_BILLTO_LBL');
}
else {
echo vmText::('COM_VIRTUEMART_USER_FORM_ADD_SHIPTO_LBL');
}
?>

</h2>

<!--<form method="post" id="userForm" name="userForm" action="<?php echo JRoute::('index.php'); ?>" class="form-validate">-->
<div class="control-buttons">
<?php
if ($this->cart->getInCheckOut() || $this->address_type == 'ST') {
$buttonclass 'btn btn-default btn-outline';
}
else {
$buttonclass 'btn btn-primary btn-outline';
}


if (VmConfig::get ('oncheckout_show_register'1) && $this->userDetails->JUser->id == && !VmConfig::get ('oncheckout_only_registered'0) && $this->address_type == 'BT' and $rview == 'cart') {
echo '<div id="reg_text">'.vmText::sprintf ('COM_VIRTUEMART_ONCHECKOUT_DEFAULT_TEXT_REGISTER'vmText::('COM_VIRTUEMART_REGISTER_AND_CHECKOUT'), vmText::('COM_VIRTUEMART_CHECKOUT_AS_GUEST')).'</div>'; }
else {
//echo vmText::_('COM_VIRTUEMART_REGISTER_ACCOUNT');
}
if (VmConfig::get ('oncheckout_show_register'1) && $this->userDetails->JUser->id == && $this->address_type == 'BT' and $rview == 'cart') {
?>

<button  name="register" class="<?php echo $buttonclass ?> btn" type="submit" onclick="javascript:return myValidator(userForm,true);"
title="<?php echo vmText::('COM_VIRTUEMART_REGISTER_AND_CHECKOUT'); ?>"><?php echo vmText::('COM_VIRTUEMART_REGISTER_AND_CHECKOUT'); ?></button>
<?php if (!VmConfig::get ('oncheckout_only_registered'0)) { ?>
<button name="save" class="<?php echo $buttonclass ?> btn" title="<?php echo vmText::('COM_VIRTUEMART_CHECKOUT_AS_GUEST'); ?>" type="submit"
onclick="javascript:return myValidator(userForm, false);"><?php echo vmText::('COM_VIRTUEMART_CHECKOUT_AS_GUEST'); ?></button>
<?php ?>
<button class="btn btn-default btn-outline" type="reset"
onclick="window.location.href='<?php echo JRoute::('index.php?option=com_virtuemart&view=' $rview.'&task=cancel'); ?>'"><?php echo vmText::('COM_VIRTUEMART_CANCEL'); ?></button>
<?php
}
else {
?>

<button class="btn btn-primary btn-outline" type="submit"
onclick="javascript:return myValidator(userForm,true);"><?php echo vmText::('COM_VIRTUEMART_SAVE'); ?></button>
<button class="btn btn-default btn-outline" type="reset"
onclick="window.location.href='<?php echo JRoute::('index.php?option=com_virtuemart&view=' $rview.'&task=cancel'); ?>'"><?php echo vmText::('COM_VIRTUEMART_CANCEL'); ?></button>
<?php ?>
</div>
<?php // captcha addition
if(VmConfig::get ('reg_captcha')){
JHTML::_('behavior.framework');
JPluginHelper::importPlugin('captcha');
$captcha_visible vRequest::getVar('captcha');
$dispatcher JDispatcher::getInstance(); $dispatcher->trigger('onInit','dynamic_recaptcha_1');
$hide_captcha = (VmConfig::get ('oncheckout_only_registered') or $captcha_visible) ? '' 'style="display: none;"';
?>

<fieldset id="recaptcha_wrapper" <?php echo $hide_captcha ?> class="featured-box">
<?php if(!VmConfig::get ('oncheckout_only_registered')) { ?>
<h3><?php echo vmText::('COM_VIRTUEMART_USER_FORM_CAPTCHA'); ?></h3>
<?php ?>
<div id="dynamic_recaptcha_1"></div>
</fieldset>
<?php 
// end of captcha addition
?>
   


<?php 
if (!class_exists ('VirtueMartCart')) {
require(VMPATH_SITE DS 'helpers' DS 'cart.php');
}

if (count ($this->userFields['functions']) > 0) {
echo '<script language="javascript">' "\n";
echo join ("\n"$this->userFields['functions']);
echo '</script>' "\n";
}

echo $this->loadTemplate ('userfields');

if ($this->userDetails->JUser->get ('id')) {
echo $this->loadTemplate ('addshipto');
?>

   
<input type="hidden" name="option" value="com_virtuemart"/>
<input type="hidden" name="view" value="user"/>
<input type="hidden" name="controller" value="user"/>
<input type="hidden" name="task" value="saveUser"/>
<input type="hidden" name="layout" value="<?php echo $this->getLayout (); ?>"/>
<input type="hidden" name="address_type" value="<?php echo $this->address_type?>"/>
<?php if (!empty($this->virtuemart_userinfo_id)) {
echo '<input type="hidden" name="shipto_virtuemart_userinfo_id" value="' . (int)$this->virtuemart_userinfo_id '" />';
}
echo JHtml::('form.token');
?>


</fieldset>
</form>

But I still have same error:
Quote
Call to a member function getCode() on null: Call to undefined method VirtuemartViewUser::vmValidator()

Any suggestion to fix this issue?

Thank you very much for your attention.
Angela

nikhilthecool

  • Beginner
  • *
  • Posts: 6
  • A beginner
Re: Call to undefined method VirtuemartViewUser::vmValidator
« Reply #9 on: January 27, 2019, 08:08:41 am »
Ok. So I commented out

//JHtml::stylesheet ('vmpanels.css', JURI::root () . 'components/com_virtuemart/assets/css/');
and added
vmJsApi::vmValidator(); after vmJsApi::css('vmpanels');

but still see the error page Call to undefined method VirtuemartViewUser::vmValidator() Go Back Home

Here's my entire edit_address.php

Please help me resolve this.

Code: [Select]
<?php
/**
 *
 * Enter address data for the cart, when anonymous users checkout
 *
 * @package    VirtueMart
 * @subpackage User
 * @author Oscar van Eijk, Max Milbers
 * @link http://www.virtuemart.net
 * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved.
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
 * VirtueMart is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 * @version $Id: edit_address.php 8565 2014-11-12 18:26:14Z Milbo $
 */
// Check to ensure this file is included in Joomla!
defined ('_JEXEC') or die('Restricted access');

// Implement Joomla's form validation
//JHtml::_ ('behavior.formvalidation');
//JHtml::stylesheet ('vmpanels.css', JURI::root () . 'components/com_virtuemart/assets/css/');
vmJsApi::css('vmpanels');
vmJsApi::vmValidator();
?>

<h1 class="page-user-title"><?php echo $this->page_title ?></h1>
<?php
if (!class_exists('VirtueMartCart')) require(VMPATH_SITE DS 'helpers' DS 'cart.php');
$this->cart VirtueMartCart::getCart();
$url 0;
if (
$this->cart->_fromCart or $this->cart->getInCheckOut()) {
$rview 'cart';
}
else {
$rview 'user';
}

$task '';
if (
$this->cart->getInCheckOut()){
//$task = '&task=checkout';
}
$url JRoute::('index.php?option=com_virtuemart&view='.$rview.$task$this->useXHTML$this->useSSL);

echo 
shopFunctionsF::getLoginForm (TRUEFALSE$url);

//$this->vmValidator();
//vmJsApi::vmValidator();
?>


<form method="post" id="userForm" name="userForm" class="form-validate edit-form" action="<?php echo JRoute::_('index.php?option=com_virtuemart&view=user',$this->useXHTML,$this->useSSL?>" >
<fieldset>
<h2><?php
if ($this->address_type == 'BT') {
echo vmText::('COM_VIRTUEMART_USER_FORM_EDIT_BILLTO_LBL');
}
else {
echo vmText::('COM_VIRTUEMART_USER_FORM_ADD_SHIPTO_LBL');
}
?>

</h2>

<!--<form method="post" id="userForm" name="userForm" action="<?php echo JRoute::('index.php'); ?>" class="form-validate">-->

<?php // captcha addition
if(VmConfig::get ('reg_captcha')){
JHTML::_('behavior.framework');
JPluginHelper::importPlugin('captcha');
$captcha_visible vRequest::getVar('captcha');
$dispatcher JDispatcher::getInstance(); $dispatcher->trigger('onInit','dynamic_recaptcha_1');
$hide_captcha = (VmConfig::get ('oncheckout_only_registered') or $captcha_visible) ? '' 'style="display: none;"';
?>

<fieldset id="recaptcha_wrapper" <?php echo $hide_captcha ?>>
<?php if(!VmConfig::get ('oncheckout_only_registered')) { ?>
<span class="userfields_info"><?php echo vmText::('COM_VIRTUEMART_USER_FORM_CAPTCHA'); ?></span>
<?php ?>
<div id="dynamic_recaptcha_1"></div>
</fieldset>
<?php }
// end of captcha addition

if (!class_exists ('VirtueMartCart')) {
require(VMPATH_SITE DS 'helpers' DS 'cart.php');
}

if (count ($this->userFields['functions']) > 0) {
echo '<script language="javascript">' "\n";
echo join ("\n"$this->userFields['functions']);
echo '</script>' "\n";
}

echo $this->loadTemplate ('userfields');

if ($this->userDetails->JUser->get ('id')) {
echo $this->loadTemplate ('addshipto');
?>


<div class="control-buttons">
<?php


if ($this->cart->getInCheckOut() || $this->address_type == 'ST') {
$buttonclass 'default';
}
else {
$buttonclass 'button vm-button-correct';
}


if (VmConfig::get ('oncheckout_show_register'1) && $this->userDetails->JUser->id == && !VmConfig::get ('oncheckout_only_registered'0) && $this->address_type == 'BT' and $rview == 'cart') {
echo '<div id="reg_text">'.vmText::sprintf ('COM_VIRTUEMART_ONCHECKOUT_DEFAULT_TEXT_REGISTER'vmText::('COM_VIRTUEMART_REGISTER_AND_CHECKOUT'), vmText::('COM_VIRTUEMART_CHECKOUT_AS_GUEST')).'</div>'; }
else {
//echo vmText::_('COM_VIRTUEMART_REGISTER_ACCOUNT');
}
if (VmConfig::get ('oncheckout_show_register'1) && $this->userDetails->JUser->id == && $this->address_type == 'BT' and $rview == 'cart') {
?>

<button name="register" class="<?php echo $buttonclass ?>" type="submit" onclick="javascript:return myValidator(userForm,true);"
title="<?php echo vmText::('COM_VIRTUEMART_REGISTER_AND_CHECKOUT'); ?>"><?php echo vmText::('COM_VIRTUEMART_REGISTER_AND_CHECKOUT'); ?></button>
<?php if (!VmConfig::get ('oncheckout_only_registered'0)) { ?>
<button name="save" class="<?php echo $buttonclass ?>" title="<?php echo vmText::('COM_VIRTUEMART_CHECKOUT_AS_GUEST'); ?>" type="submit"
onclick="javascript:return myValidator(userForm, false);"><?php echo vmText::('COM_VIRTUEMART_CHECKOUT_AS_GUEST'); ?></button>
<?php ?>
<button class="default" type="reset"
onclick="window.location.href='<?php echo JRoute::('index.php?option=com_virtuemart&view=' $rview.'&task=cancel'); ?>'"><?php echo vmText::('COM_VIRTUEMART_CANCEL'); ?></button>
<?php
}
else {
?>

<button class="<?php echo $buttonclass ?>" type="submit"
onclick="javascript:return myValidator(userForm,true);"><?php echo vmText::('COM_VIRTUEMART_SAVE'); ?></button>
<button class="default" type="reset"
onclick="window.location.href='<?php echo JRoute::('index.php?option=com_virtuemart&view=' $rview.'&task=cancel'); ?>'"><?php echo vmText::('COM_VIRTUEMART_CANCEL'); ?></button>
<?php ?>
</div>

<input type="hidden" name="option" value="com_virtuemart"/>
<input type="hidden" name="view" value="user"/>
<input type="hidden" name="controller" value="user"/>
<input type="hidden" name="task" value="saveUser"/>
<input type="hidden" name="layout" value="<?php echo $this->getLayout (); ?>"/>
<input type="hidden" name="address_type" value="<?php echo $this->address_type?>"/>
<?php if (!empty($this->virtuemart_userinfo_id)) {
echo '<input type="hidden" name="shipto_virtuemart_userinfo_id" value="' . (int)$this->virtuemart_userinfo_id '" />';
}
echo JHtml::('form.token');
?>


</fieldset>
</form>

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8837
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: Call to undefined method VirtuemartViewUser::vmValidator
« Reply #10 on: January 27, 2019, 13:46:11 pm »
I have no idea

u call the function onclick="javascript:return myValidator(userForm, false);  on the submit button

which u have loaded at the start of the file with vmJsApi::vmValidator(); which has the function function myValidator()

check <script src="/components/com_virtuemart/assets/js/vmvalidator.js?vmver=01d6f5e0" defer></script> is loaded
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation