News:

Looking for documentation? Take a look on our wiki

Main Menu

Recent posts

#41
Out of Range Value means that the value you are trying to save in the Virtuemart_Calc_id column is beyond the allowed range for this field in the database. Your result indicates -1. This is a negative value for the displayed item, which of course is illogical. The column can be UNSIGNED INT which means that it only accepts 0 and larger values.

if(empty($_cart->cartPrices['payment_calc_id'])){
    $orderCalcRules->virtuemart_calc_id = 0; // Instead of -1
    $orderCalcRules->calc_value = 0.0;
    $orderCalcRules->calc_rule_name = vmText::_('COM_VIRTUEMART_NONE');
} else {
#42
Hi,

I am testing an update from VM 4.2.18 to VM 4.4.6
Joomla 5.2.5
PHP 8.1

VM 4.2.18 works perfectly for me, but after updating to VM 4.4.6, I get the following error when completing a purchase:


vmError: vmTable store insertObject #__virtuemart_order_calc_rules Out of range value for column 'virtuemart_calc_id' at row 1 INSERT INTO `rek6z_virtuemart_order_calc_rules` (`virtuemart_calc_id`,`virtuemart_order_id`,`virtuemart_vendor_id`,`calc_rule_name`,`calc_kind`,`calc_amount`,`calc_result`,`calc_value`,`created_on`,`created_by`) VALUES ('-1','9374','1','None','payment','0','0','0','2025-03-13 22:04:32','866')
Do you have any idea what might be causing this issue?

Around line 2295 of the orders.php file:


This code is being executed:

if(empty($_cart->cartPrices['payment_calc_id'])){
    $orderCalcRules->virtuemart_calc_id = -1;
    $orderCalcRules->calc_value = 0.0;
    $orderCalcRules->calc_rule_name = vmText::_('COM_VIRTUEMART_NONE');
} else {

The value of $_cart->cartPrices['payment_calc_id'] is 0, but this value is incorrect.



Carlos.
#43
I have the latest version, and everything works fine for me. It's very likely that your problem is related to a full update of VirtueMart along with the VmAdmin template. I never do this because updating this template usually causes more issues than benefits. Install an older template (i have vmadmin 4.2.18) and simply fix line 54 in the /administrator/templates/vmadmin/html/com_virtuemart/custom/default.php file by changing:

$customs = $this->customs->items;to
$customs = $this->customs;
#44
Version 4.4.6 (and V4.4.4 before)

The selection of extra related products is impossible.

I can add the custom field, but when it comes to selecting an 'extra related product' the search feature doesn't work, I type in a product description or part thereof and there are no options to add, none are presented, Ive tried by product name or SKU and nothing is presented.

#45
Acctually I don't need it, but as I remember well, someone already wrote about this problem once and it was solved exactly the same way. It's just strange that the Virtuemart authors don't read this forum to use user comments to fix these bugs :)
#46
General Questions / Re: Extra Related Products
Last post by hazael - March 12, 2025, 22:02:32 PM
You have so many forum posts written and you don't know that?  ???

When you publish this custom field, then in the settings of the selected product in the last tab where the custom fields are - above you will find the related products. Enter the SKU code or product name in this field and when it appears, add it.

In order for these related products to be displayed on the front page in the product of your choice, you need to add PHP code in the user interface template

If in productdetails
<?php echo shopFunctionsF::renderVmSubLayout('customfields_related',array('product'=>$this->product,'position'=>'related_products','class'=> 'product-related-products','customTitle' => true ));?>
If you don't want unnecessary html code, then try to display it like this
<?php foreach ($this->product->customfieldsSorted['related_products'] as $rp); echo $rp->display?>

PS.
In my opinion, this custom field has a flaw - I think it is a bug. Because if I add other related products to the selected product, and in the future they are physically removed from the list of products, then errors start to appear on the site - this should not be the case and this problem has never been fixed.
#47
General Questions / Extra Related Products
Last post by sandomatyas - March 12, 2025, 15:30:33 PM
Hi,

I installed a fresh VirtueMart 4.4.6 and found a custom field type called "Extra Related Products." I have added it, but I can't see how it should work.

My goal is to add grouped related products—for example, when selling smartphones, I would like to add "related cases," "related chargers," "related screen protectors," etc.

Is this field intended for this purpose? If not, what is it used for? Also, what would you suggest for adding grouped related products?

Thanks in advance!
#48
Thanks mate
#50
Virtuemart Development and bug reports / Re: SVN repo offline
Last post by iWim - March 12, 2025, 10:40:05 AM
I think the devs have been abducted by aliens from Mars, forced to write code for a new feature in the spaceship's mainframe, which introduced a bug and now the aliens are unable to beam them back to earth.