Recent Posts

Pages: 1 [2] 3 4 ... 10
Templating & Layouts / Delivery address on order form - VM4
« Last post by thefbi on December 01, 2023, 06:51:46 AM »

I updated Virtuemart on Joomla 4 and installed VMUIKIT.

I have a small problem: before, when I printed a delivery note, the delivery address was indicated.

Now, it's just marked "Identical to billing", which poses a problem for my customer who uses the delivery note to put in the envelope with the package. But as it's no longer displayed, you can't see it in the envelope window, where you need to see the address for the letter carrier.

So my question is, how can I ensure that even if the delivery address is identical, it's still displayed on the vouchers?

I asked VMUIKT team and they say it is the default VM view used for that.

See my screenshots.

Joomla 4.4.0
Virtuemart 4.2.4 10922
PHP 8.1

Virtuemart Development and bug reports / Re: Triggering plugins
« Last post by sandomatyas on December 01, 2023, 05:32:08 AM »
Thanks Jumbo :)
General Questions / how build plugin, missing documentation
« Last post by Emma Iana on November 30, 2023, 23:48:03 PM »
I am trying to solve the plugin problem.
Where can I find the instruction?

The current and others links do not work.

I need to know how to create plugin properly for VM4.

Plugins: Payment, Shipment and others / configuration is not saving, how debug
« Last post by Emma Iana on November 30, 2023, 22:49:47 PM »

I have a dedicated plugin for shipment that I have been using since the VM3 version. I am currently using the VM4 version.

Now I realized that when I trying to save its configuration, the data was deleted.

I mean the data saved in virtuemart_shipmentmethods -> shipment_params. Every time I save, only the entry display_color=""| appears there.

How can I start looking for the cause?

When I put the relevant data in the database manually, everything works. The problem is with saving.
Virtuemart Development and bug reports / Re: Triggering plugins
« Last post by Jumbo! on November 30, 2023, 21:59:59 PM »
Their statement is partially correct. Yes, the "on" prefix in the event names is new in Joomla 4. However, VirtueMart must remain backwards compatible with all its existing extensions, so changing the event name will not be wise.

There is an easy solution available to deal with this problem.

They need to add the following lines of codes in the "__construct" function in their plugin - plugins/system/acymtriggers/acymtriggers.php.

Code: [Select]
        if (version_compare(JVERSION, '4.0.0', 'ge')) {

That's it. Now, the event will get triggered correctly, just like Joomla 3.
I said you to use customfield_params
VM do not filter what you save in the customfield_params
So i do not use native code in my case
Virtuemart Development and bug reports / Triggering plugins
« Last post by sandomatyas on November 30, 2023, 18:08:17 PM »
We migrated a Joomla 3 + VM4 site to Joomla 4 + VM4. Also we had an Acymailing automation, triggered when a customer places an order, and it stopped after the update. Interestingly, these settings had previously operated seamlessly on a Joomla 3 site.
Upon reaching out to Acymailing and their excellent support, they identified the issue:

As they wrote:
The VirtueMart trigger we based our integration on is named "plgVmOnUserOrder". It is still working for Joomla 3 websites, but Joomla decided starting from their version 4 that every trigger must be prefixed with "on". This lead to this trigger to not working anymore in Joomla 4+.

As a temporary fix, in the VirtueMart file administrator/components/com_virtuemart/models/orders.php near the line 1783, this code:

$plg_datas = vDispatcher::trigger('plgVmOnUserOrder',array(&$_orderData));

May be replaced by this code:

$plg_datas = vDispatcher::trigger('onplgVmOnUserOrder',array(&$_orderData));

Then in the AcyMailing file plugins/system/acymtriggers/acymtriggers.php near the line 99, this code:

public function plgVmOnUserOrder($orderData)

May be replaced by this code:

public function onplgVmOnUserOrder($orderData)

This should fix the trigger in AcyMailing, but for a more permanent solution the VirtueMart team should apply the modification in a future version. Do you already have a contact with a member of the VirtueMart support? They may be interested in this information.

What do you think?
Virtuemart Development and bug reports / Sanitize filenames during upload
« Last post by sandomatyas on November 30, 2023, 16:56:52 PM »
When uploading media, VM utilizes vmUploader.uploadFile() for the process. Let's assume your filename is 'birdéá birdéá.jpg,' containing special characters and spaces. The method employs $safeMediaName = vmFile::makeSafe($media['name']);, but it yields the same result, 'birdéá birdéá.jpg.'

When dealing with unicode filenames, this approach may lead to several issues. Consider implementing additional filters. After the aforementioned step, you could add $media['name'] = JFile::makeSafe($media['name']);, which provides a nearly satisfactory result: 'birdea birdea.jpg.' However, note that JFile::makeSafe retains spaces, which may not be ideal. To address this, you can add another line: $media['name'] = preg_replace('/[^a-zA-Z0-9_\-.]/', '_', $media['name']);. This ensures the safest version of the original name: 'birdea_birdea.jpg.'

Code: [Select]
$media['name'] = JFile::makeSafe( $media['name'] );
$media['name'] = preg_replace('/[^a-zA-Z0-9_\-.]/', '_', $media['name']);
What are your thoughts on this approach?
General Questions / Joomla upgrade 4.4.0 to 4.4.1 problem in VirtueMart
« Last post by sylwekb on November 30, 2023, 11:47:26 AM »

I have updated many Joomla sites to the latest version 4.4.1. However, in one case, where I have Virtuemart, the website falls apart. When I restore Joomla 4.4.0 it is fine. What is the cause and what needs to be fixed? Cassiopeia standard template.

Version VirtueMart 4.2.0 10905
Virtuemart Development and bug reports / Custom Fields In modules
« Last post by niosme on November 30, 2023, 09:55:38 AM »
Instead of this

                  echo '<div class="product-price">';
                  //       echo $currency->priceDisplay($product->prices['salesPrice']);
                  if (!empty($product->prices['salesPrice'])) {
                     echo $currency->createPriceDiv ('salesPrice', '', $product->prices, FALSE, FALSE, 1.0, TRUE);
                  //       if ($product->prices['salesPriceWithDiscount']>0) echo $currency->priceDisplay($product->prices['salesPriceWithDiscount']);
                  if (!empty($product->prices['salesPriceWithDiscount'])) {
                     echo $currency->createPriceDiv ('salesPriceWithDiscount', '', $product->prices, FALSE, FALSE, 1.0, TRUE);
                  echo '</div>';

i was using this with ovewrite in the modules to show the custom fields also

echo shopFunctionsF::renderVmSubLayout('addtocart',array('product'=>$product));

For a reason it stopped showing the custom fields.

How to show custom fields in modules?The custom fields i use is with the stockable custom fields.
But also module is an age before left. Not showing custom fields from maybe plugins in frontend but shows them in category page.Inside product if we are in the same product with the product we showing in the module it shows twice the fields.
Pages: 1 [2] 3 4 ... 10