News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Recent posts

#1
Templating & Layouts / Re: Smaller Preview Product Im...
Last post by MAD King - Yesterday at 15:26:38 PM
Back end, not front end.
#2
Installation, Migration & Upgrade / Re: 1525 INCORRECT DATETIME VA...
Last post by AH - Yesterday at 13:39:10 PM
Look in your VM tables for Default DATETIME fields with a value of 0000-00-00 00:00:00

MYSQL does not like these
#3
General Questions / Re: Generate Quotations
Last post by AH - Yesterday at 13:36:12 PM
What do you mean by user

Customer or Store admin person
#4
Templating & Layouts / Re: Customer Name and Firstnam...
Last post by AH - Yesterday at 13:34:53 PM
It is not a very simple process.

The details are rendered in the file
views\invoice\tmpl\invoice_order.php

You can override this using a template override

However the Customer Billing detail fields need to be "separated for individual handling"

<td valign="top"><strong>
    <?php echo vmText::_('COM_VIRTUEMART_ORDER_PRINT_BILL_TO_LBL'?></strong> <br/>
    <table border="0"><?php
    foreach (
$this->userfields['fields'] as $field) {
if (!empty($field['value'])) {
    echo '<tr><td class="key">' $field['title'] . '</td>'
    . '<td>' $field['value'] . '</td></tr>';
}
    }
    ?>
</table>
</td>
<td valign="top" ><strong>
    <?php echo vmText::_('COM_VIRTUEMART_ORDER_PRINT_SHIP_TO_LBL'?></strong><br/>
<?php if(!empty($this->orderDetails['details']['has_ST'])){
echo "<table border='0'>";
foreach ($this->shipmentfields['fields'] as $field) {
if (!empty($field['value'])) {
echo '<tr><td class="key">' $field['title'] . '</td>'
'<td>' $field['value'] . '</td></tr>';
}
}
echo "</table>";
} else {
echo "<br/>".vmText::_('COM_VM_ST_SAME_AS_BT');
}

?>

        </td>

This is the code that prints the Billing and Shipping details

So you need to do something different for the elements 'first_name', 'last_name'

You can do this:

1. Create an array list of BT and ST VirtueMart fields you want to print and sequence this list in the sequence you want to print them e.g.

$addressBTOrder = array('first_name', 'last_name{br}', 'company{br}','address_1{br}', 'address_2{br}', 'city{br}', 'zip{br}', 'virtuemart_country_id{br}', 'phone_1{br}', 'email{br}');
$addressSTOrder = array('first_name', 'last_name{br}', 'company{br}','address_1{br}', 'address_2{br}', 'city{br}', 'zip{br}', 'virtuemart_country_id{br}', 'phone_1');


2. Have the code iterate through this list and print each element, doing something different for the elements 'first_name' 'last_name'.

This code shows you how to loop through the 2 arrays - you can do whatever you want to each array field by editing this loop.

foreach ($addressBTOrder as $fieldname) {
$fieldinfo = explode('{',$fieldname);
if (!empty($this->userfields['fields'][$fieldinfo[0]]['value'])) {
echo $this->userfields['fields'][$fieldinfo[0]]['value'];
echo " ";
if (isset($fieldinfo[1]) && $fieldinfo[1] == 'br}') {
echo "<br>";
}
}
}


Modify the foreach loop to handle the ST details ($addressSTOrder as $fieldname)
#5
SKU and GTIN is already included in indexing.
I've now added MPN in v1.0.1.

And you're right, this issue seems to be a bug in the finder.
#6
Templating & Layouts / Customer Name and Firstname in...
Last post by Maurice712 - April 25, 2024, 12:08:14 PM
Hello together

I am looking for a simple solution to display the customer name and first name in bold font in the PDF invoice.

According to my research it is defined in the /com_virtuemart/views/invoice/tmpl files. I have already tried various things, but it does not work. Is there a simple solution?

Joomla: 4.2.9
VM: 4.2.4 10922
#7
Thanks for your work! I've tested it in Joomla 5.1 and VM 4.2.8. Seems to work, it just runs into this error when there is characters in the product name like ß. Duplicate entry 'set weiss-de' for key 'idx_term_language'

But I think that is a Smart Search (Finder) issue, not per se your plug-in. Or maybe the collation setting. I've currently set it to: utf8mb4_unicode_520_ci

What I am missing however, is the incorporation of searching for SKU, GTIN and MPN. Currently I am using Custom Filters Pro search from Breakdesigns. Here you can also set the search to look in those fields. Would it be hard to implement this into your plug-in?
#8
Hello, did you ever get this resolved? My hosting updated to mysql 8 and getting the same error on some products.  Some products open however products that have a child product are throwing the Incorrect DATETIME value: '' messge.
#9
Product creation / Related Products / Sub Product...
Last post by gpessoa - April 24, 2024, 17:58:43 PM
I duplicated the Related Products in the Custom Fields tab.
The problem is that it doesn't appear in the product custom fields tab, so I can't insert the respective items, like I do on regular related products...
How or Where does this work?
#10
Since nobody wanted to do this, I've made it on my own.

Here is the github link to the package which contains all plugins needed to use the smart search aka finder:
https://github.com/Dudebaker/Virtuemart-Finder

The Virtuemart-Core is missing some events, so these had to be done with an additional system plugin.

Maybe the Virtuemart dev-team can add these events (would only be 4 lines of code) and maybe they can use this package as base to add it to the Virtuemart-Package.