0 Пользователей и 1 Гость просматривают эту тему.
  • 17 Ответов
  • 2977 Просмотров
*

David_99

  • Захожу иногда
  • 146
  • 3 / 0
Здравствуйте.
Проблема на сайте связана с оформлением заказа.При нажатия на "Оформить заказ" выводится белый пустой экран.Никаких ошибок.
После включения показа ошибок выводится следующее:"Fatal error: Call to undefined method VmVendorPDF::convertHTMLColorToDec() in /home/s/"Хост"/Ваш сайт/public_html/components/com_virtuemart/helpers/vmpdf.php on line 111".
 
В некоторых сайтах предлагалось  обновить VirtueMart aio.Но обновить его нельзя, без обновления самого VM.А сам VM обновить никак, много нервов и времени было потрачено на его перевод, настройку и т.д.

Неужели придется идти на крайние меры и начать все заново?
*

David_99

  • Захожу иногда
  • 146
  • 3 / 0
Re: Fatal error: Call to undefined method VmVendorPDF
« Ответ #1 : 27.09.2014, 15:23:11 »
Проблему решил без обновления.Просто заменил файлы из рабочего сайта, где произошли ошибки.Правда пришлось заменить больше 30 файлов, но да ладно.Главное, что все работает  ^-^
*

kasper9820

  • Захожу иногда
  • 127
  • 4 / 6
  • ...ISponsor!
Re: Fatal error: Call to undefined method VmVendorPDF
« Ответ #2 : 08.12.2014, 14:19:10 »
Товарищи! Помогите!

VirtueMart 3.0.2 + Joomla 2.5.14 + vmvendor 1.2.8

На фронте, при добавлении товара в магазин с помощью vmvendor ошибка (Warning: Invalid argument supplied for foreach(/components/com_vmvendor/views/addproduct/tmpl/default.php on line 884))

Вот этот кусочек отвечает за ошибку (с третьей строки). Как видим проблема с дополнительными полями.
Разработчик дописал, что эта ф. еще не доработана.

Давайте попробует решить эту проблему. Мне кажется, что в вер. 1.2.9 или выше этот участок уже в порядке. Если у кого-то есть свежак прошу поделиться, хотя бы этим кусочком кода.
Ну а пока прошу помочь с функцией ($this->core_custom_fields as $core_custom_field)

в файле view.html.php эта функция объявлена таким образом ($this->core_custom_fields      = $this->get('corecustomfields');)

очень, очень прошу помощи.

Код
	//////////////////////////////	Core Custom fields support Hasardous place as VirtueMart shared and multivendor custom fields is not totally done yet.	

if($enable_corecustomfields){
$i = 0;
foreach ($this->core_custom_fields as $core_custom_field){
$i++;
echo  '<tr align="left" class="sectiontableentry2">';
echo $typefield;
echo $core_custom_field;
echo $this->loadTemplate('customfields');
echo '<td>';
//echo 'Under dev: ';
echo $core_custom_field->custom_title;
echo $typefield->custom_title;

if($typefield->custom_tip !='' OR $typefield->custom_field_desc!='' )
echo ' <img src="'.$juri.'components/com_vmvendor/assets/img/info.png" title="'.$typefield->custom_tip.'::'.$typefield->custom_field_desc.'" width="16" height="16" alt="" class="'.$tooltip_class.'"/>';
echo  '</td>';
echo '<td >';

switch($typefield->field_type){
case "S":  //string
$core_custom_field_custom_value = $core_custom_field->custom_value;
if (JRequest::getVar('get_cf'.$i)!='')
$core_custom_field_custom_value = JRequest::getVar('get_cf'.$i);
echo '<input name="corecustomfield_'.$i.'" type="text" value="'.$core_custom_field_custom_value.'" size="50" ';
if (JRequest::getVar('get_cf'.$i)!='')
echo ' readonly="readonly" ';
echo '/>';
break;
case "I": // integer
echo '<input name="corecustomfield_'.$i.'" type="text" value="'.$core_custom_field->custom_value.'" size="50"  />';
break;
case "B": // bolean
echo '<input name="corecustomfield_'.$i.'" id="corecustomfield_'.$i.'_0" type="radio"   value="0" ';
if($core_custom_field->custom_value =='0' )
echo ' checked="checked" ';
echo  '/> <label for="corecustomfield_'.$i.'_0">'.JText::_('JNo').'</label>
<input name="corecustomfield_'.$i.'" id="corecustomfield_'.$i.'_1"   type="radio"    value="1"';
if($core_custom_field->custom_value =='1' )
echo ' checked="checked" ';
echo ' /> <label for="corecustomfield_'.$i.'_1">'.JText::_('JYes').'</label>';
break;
case "D": // date

echo JHTML::calendar('','corecustomfield_'.$i ,'corecustomfield_'.$i,'%Y-%m-%d');
break;
case "T": // time
echo '<input name="corecustomfield_'.$i.'" type="text" value="'.$core_custom_field->custom_value.'" size="50"  />';
break;
case "M": // image

break;
case "V": // cart variant
echo '<input name="corecustomfield_'.$i.'" type="text" value="'.$core_custom_field->custom_value.'" size="50"  />';
break;
case "A": // generic Child variant
                    //vmdebug('displayProductCustomfieldBE $field',$field);
                    if(!isset($field->withParent)) $field->withParent = 0;
                    if(!isset($field->parentOrderable)) $field->parentOrderable = 0;
                    //vmdebug('displayProductCustomfieldFE',$field);
                    if (!class_exists('VmHTML')) require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'html.php');
                    $html = JText::_('COM_VIRTUEMART_CUSTOM_WP').VmHTML::checkbox('field[' . $row . '][withParent]',$field->withParent,1,0,'').'<br />';
                    $html .= JText::_('COM_VIRTUEMART_CUSTOM_PO').VmHTML::checkbox('field[' . $row . '][parentOrderable]',$field->parentOrderable,1,0,'');

                    $options = array();
//                  $options[] = array( 'value' => 'product_name' ,'text' =>JText::_('COM_VIRTUEMART_PRODUCT_FORM_NAME')); Is anyway displayed there
                    $options[] = array('value' => 'product_sku', 'text' => JText::_ ('COM_VIRTUEMART_PRODUCT_SKU'));
                    $options[] = array('value' => 'slug', 'text' => JText::_ ('COM_VIRTUEMART_PRODUCT_ALIAS'));
                    $options[] = array('value' => 'product_length', 'text' => JText::_ ('COM_VIRTUEMART_PRODUCT_LENGTH'));
                    $options[] = array('value' => 'product_width', 'text' => JText::_ ('COM_VIRTUEMART_PRODUCT_WIDTH'));
                    $options[] = array('value' => 'product_height', 'text' => JText::_ ('COM_VIRTUEMART_PRODUCT_HEIGHT'));
                    $options[] = array('value' => 'product_weight', 'text' => JText::_ ('COM_VIRTUEMART_PRODUCT_WEIGHT'));

                    $html .= JHTML::_ ('select.genericlist', $options, 'field[' . $row . '][custom_value]', '', 'value', 'text', $field->custom_value). '</td><td>' . $priceInput;
                    return $html;
                    //                  return 'Automatic Childvariant creation (later you can choose here attributes to show, now product name) </td><td>';
                // variants
break;
case "X": // editor
jimport( 'joomla.html.editor' );
$editor = &JFactory::getEditor();
$editor_customfield_html = $editor->display("corecustomfield_".$i , $core_custom_field->custom_value , "100%;", '200', '5', '30', false);
echo  $editor_customfield_html;

break;

case "Y": // textarea
echo '<textarea name="corecustomfield_'.$i.'" >';
echo $core_custom_field->custom_value;
echo '</textarea>';
break;
}
echo '</td>';
echo  '</tr>';
}
}
*

robert

  • Живу я здесь
  • 4974
  • 457 / 20
Re: Fatal error: Call to undefined method VmVendorPDF
« Ответ #3 : 08.12.2014, 19:55:51 »
Ну а пока прошу помочь с функцией ($this->core_custom_fields as $core_custom_field)
Это аргументы, и не функции, а конструкции цикла foreach. В чем требуется помощь?
Не будь паразитом, сделай что-нибудь самостоятельно!
*

kasper9820

  • Захожу иногда
  • 127
  • 4 / 6
  • ...ISponsor!
Re: Fatal error: Call to undefined method VmVendorPDF
« Ответ #4 : 09.12.2014, 18:50:26 »
Это аргументы, и не функции, а конструкции цикла foreach. В чем требуется помощь?

Эскъюзми за неправильную терминологию. Хотелось бы, чтобы на страничке добавления (в форме добавления) товара выводились и дополнительные поля. Сейчас они не выводятся. Пробую поставить связку начисто, предчувствую, что результата не будет

*

robert

  • Живу я здесь
  • 4974
  • 457 / 20
Re: Fatal error: Call to undefined method VmVendorPDF
« Ответ #5 : 09.12.2014, 20:48:34 »
vmvendor не юзаю, но раз выдается такое предупреждение, значит $this->core_custom_fields - не массив. Проверьте метод get('corecustomfields').
Не будь паразитом, сделай что-нибудь самостоятельно!
*

kasper9820

  • Захожу иногда
  • 127
  • 4 / 6
  • ...ISponsor!
Re: Fatal error: Call to undefined method VmVendorPDF
« Ответ #6 : 10.12.2014, 15:26:45 »
vmvendor не юзаю, но раз выдается такое предупреждение, значит $this->core_custom_fields - не массив. Проверьте метод get('corecustomfields').


После переустановки vmvendor Ошибка исчезла, но поля не отображаются. Остается разобраться почему.
*

kasper9820

  • Захожу иногда
  • 127
  • 4 / 6
  • ...ISponsor!
Re: Fatal error: Call to undefined method VmVendorPDF
« Ответ #7 : 10.12.2014, 15:27:52 »
vmvendor не юзаю, но раз выдается такое предупреждение, значит $this->core_custom_fields - не массив. Проверьте метод get('corecustomfields').

А что юз? Что можно как альтернативу использовать? В сети ничего не нарыл.
*

robert

  • Живу я здесь
  • 4974
  • 457 / 20
Re: Fatal error: Call to undefined method VmVendorPDF
« Ответ #8 : 10.12.2014, 16:46:27 »
В самом начале файла вставьте
Код: php-brief
echo '<pre>';
print_r($this->core_custom_fields);
echo '</pre>';
и посмотрите, что выводится.
Не будь паразитом, сделай что-нибудь самостоятельно!
*

kasper9820

  • Захожу иногда
  • 127
  • 4 / 6
  • ...ISponsor!
Re: Fatal error: Call to undefined method VmVendorPDF
« Ответ #9 : 10.12.2014, 18:22:51 »
В самом начале файла вставьте
Код: php-brief
echo '<pre>';
print_r($this->core_custom_fields);
echo '</pre>';
и посмотрите, что выводится.

где бы не вставлял выводит либо
Array
(
)
либо пустое место
*

robert

  • Живу я здесь
  • 4974
  • 457 / 20
Re: Fatal error: Call to undefined method VmVendorPDF
« Ответ #10 : 10.12.2014, 20:58:51 »
Поищите в models/addproduct.php функцию getcorecustomfields().
Не будь паразитом, сделай что-нибудь самостоятельно!
*

kasper9820

  • Захожу иногда
  • 127
  • 4 / 6
  • ...ISponsor!
Re: Fatal error: Call to undefined method VmVendorPDF
« Ответ #11 : 11.12.2014, 16:16:29 »
такая функция есть
Код
public function getCorecustomfields() 

{

$db = &JFactory::getDBO();

$q ="SELECT `virtuemart_custom_id` , `custom_parent_id` , `virtuemart_vendor_id` , `custom_jplugin_id` , `custom_title` , `custom_tip` , `custom_value`, `custom_field_desc` , `field_type` , `is_list` , `shared` 

FROM `#__virtuemart_customs`

WHERE `custom_jplugin_id`='0'

AND `admin_only`='0'

AND `published`='1'

AND `custom_element`!=''

ORDER BY `ordering` ASC , `virtuemart_custom_id` ASC ";

$db->setQuery($q);

$core_custom_fields = $db->loadObjectList();

$this->_core_custom_fields = $core_custom_fields;

return $this->_core_custom_fields;

}
*

kasper9820

  • Захожу иногда
  • 127
  • 4 / 6
  • ...ISponsor!
Re: Fatal error: Call to undefined method VmVendorPDF
« Ответ #12 : 11.12.2014, 16:50:28 »
Еще один интересный вопрос (момент):
На стр. Мои товары выводятся товары с одним изображением (это очень неудобно). Задумал я вывести дополнительные изо-я, как в самом витре и вот он код.
Не могу понят как зациклить вывод. Выводит одну и туже картинку или просто "i". Смотрю в нет php, но без совета уже много кофе выпил а дело стоит. Подскажите пожалуйста. Эта ветка может стать интересной, по модернизации vmvendora.
Код
$q ="SELECT vm.`file_url_thumb` 
FROM `#__virtuemart_medias` vm
LEFT JOIN `#__virtuemart_product_medias` vpm ON vpm.`virtuemart_media_id` = vm.`virtuemart_media_id`
WHERE vpm.`virtuemart_product_id`='".$product->virtuemart_product_id."'
AND vm.`file_mimetype` LIKE 'image/%'
ORDER BY vm.`file_is_product_image` DESC ";
$db->setQuery($q); //3. Установим этот запрос в экземпляр класса работы с базами данных
$db->query(); //4.  Выполним запрос
echo ' '.$db->getAffectedRows ().''; //5. Посмотрим  сколько было задействовано строк

$thumburl = $db->loadResult();

if(!$thumburl)
$thumburl = 'components/com_virtuemart/assets/images/vmgeneral/'.VmConfig::get('no_image_set');

echo '<div class="browsecellwidth">';
echo $product->virtuemart_vendor_id;
echo '<div class="compaign-name"><h6><a href="'.$product_url.'" >'.ucfirst($product->product_name).'</a></h6></div>';
echo '<div class="holder-compaign-avatar"><div class="slider"><div class="slides">';
$count_images = $db->getAffectedRows ();
echo $count_images;
if ($count_images > 10) {
for ($i = 1; $i < 10; $i++)
{
$img = $thumburl[$i];
echo '<div class="slide"><a href="'.$juri.$img.'" alt="'.ucfirst($product->product_name).'" data-lightbox="roadtrip['.ucfirst($product->product_name).']" tite="'.ucfirst($product->product_s_desc).'" data-title="'.ucfirst($product->product_s_desc).'"><img src="'.$juri.$img.'" class="compaign-avatar"></a></div>';
}
} else {
for ($i = 0; $i < $count_images; $i++)
{
$img = $thumburl[$i];
echo '<div class="slide"><a href="'.$juri.$img.'" alt="'.ucfirst($product->product_name).'" data-lightbox="roadtrip['.ucfirst($product->product_name).']" tite="'.ucfirst($product->product_s_desc).'" data-title="'.ucfirst($product->product_s_desc).'"><img src="'.$juri.$img.'" class="compaign-avatar"></a></div>';


Странно, что разработчик не удосужился завести функцию  вывести доп. изо. Все делается непосредственно в темплейте. И сам темплейт кривой. Решил его переделать. С Вашей помощью может получиться чудненький ап. Могу выложить результат
*

kasper9820

  • Захожу иногда
  • 127
  • 4 / 6
  • ...ISponsor!
Re: Fatal error: Call to undefined method VmVendorPDF
« Ответ #13 : 11.12.2014, 17:00:22 »
... еще хочу поставить LIMIT 10 в запрос (чтобы ограничить. Вдруг придет в голову кому-то 100 изо закинуть:)) а он ругается
Код
$q ="SELECT vm.`file_url_thumb` 
FROM `#__virtuemart_medias` vm
LEFT JOIN `#__virtuemart_product_medias` vpm ON vpm.`virtuemart_media_id` = vm.`virtuemart_media_id`
WHERE vpm.`virtuemart_product_id`='".$product->virtuemart_product_id."'
AND vm.`file_mimetype` LIKE 'image/%'
ORDER BY vm.`file_is_product_image` DESC ";
*

robert

  • Живу я здесь
  • 4974
  • 457 / 20
Re: Fatal error: Call to undefined method VmVendorPDF
« Ответ #14 : 11.12.2014, 17:17:34 »
Значит, како(и)е-то из этих условий
Код: php-brief
		WHERE `custom_jplugin_id`='0' 

AND `admin_only`='0'

AND `published`='1'

AND `custom_element`!=''
не выполняе(ю)тся.
Не превращайте тему в ваш личный блог.
Не будь паразитом, сделай что-нибудь самостоятельно!
*

kasper9820

  • Захожу иногда
  • 127
  • 4 / 6
  • ...ISponsor!
Re: Fatal error: Call to undefined method VmVendorPDF
« Ответ #15 : 11.12.2014, 17:43:49 »
Извините. А где можно обсуждать эту тему? Вы, собственно, единственный кто отвечает. Спасибо!
*

darkskai

  • Осваиваюсь на форуме
  • 41
  • 4 / 0
Re: Fatal error: Call to undefined method VmVendorPDF
« Ответ #16 : 16.06.2015, 03:04:58 »
поставил доп плагин с сайта разработчика и нет проблем все заработало
vrtuemart 2.6.18 - Joomla 2.5

com_tcpdf_for_vm2.zip  для 2.6.17

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



« Последнее редактирование: 16.06.2015, 10:26:53 от darkskai »
*

artsasha

  • Осваиваюсь на форуме
  • 22
  • 0 / 0
Re: Fatal error: Call to undefined method VmVendorPDF
« Ответ #17 : 17.11.2016, 14:20:05 »
поставил доп плагин с сайта разработчика и нет проблем все заработало
vrtuemart 2.6.18 - Joomla 2.5

com_tcpdf_for_vm2.zip  для 2.6.17

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




Да. спасибо. этот вариант работает.
НО. нужно добавить что сначала нужно предыдущий удальнуть, а потом этот накатить. Два дня решал проблему :)
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

Fatal error: Call to undefined method JController::getInstance() in......zo2fram

Автор dir.repart

Ответов: 7
Просмотров: 1031
Последний ответ 05.03.2019, 17:19:53
от draff
Parse error: syntax error, unexpected 'if' (T_IF), expecting function (T_FUNCTIO

Автор dir.repart

Ответов: 1
Просмотров: 1093
Последний ответ 04.03.2019, 17:14:40
от draff
Не получается создать страницу ошибки 404. Пробовал (htacc, error.php, галочку)

Автор Бейшен

Ответов: 1
Просмотров: 780
Последний ответ 19.08.2018, 15:58:39
от Sandruk1
На страницах вылазит какой-то код вида "if (typeof VirtueMart === "undefined") Virtuemart"

Автор kushavin

Ответов: 4
Просмотров: 1289
Последний ответ 05.04.2017, 09:42:16
от SeBun
VirtueMart Ошибка: Error: No articles to display

Автор Viktorman223

Ответов: 0
Просмотров: 799
Последний ответ 13.03.2017, 21:48:56
от Viktorman223