VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: MaHe29 on January 27, 2012, 15:17:17 PM

Title: Editing Customer registration email
Post by: MaHe29 on January 27, 2012, 15:17:17 PM
When a user creates an account he/she receive an confirmation mail.
I have a few issues with the layout and output in the confirmation email.
The email doesnt use a header and a footer like the order confirmation mail. This way the email doesnt realy match the layout or housestyle of the webshop. Making the mail look less proffesional and correlating with the website.

Also it displays the user details 2 times.
Like this:
Land: Nederland
Nederland

Translation
Country: The Netherlands
The Neherlands


So i gues there is something wrong with the HTML code of mail_html_reguser.php
This is the part of the code i think is responsible for the wrong output, but my html knowledge isnt enough to make the correction.

                foreach ($this->userFields['fields'] as $userField) {
               if (!empty($userField['value']) && $userField['type'] != 'delimiter' && $userField['type'] != 'BT' && $userField['type'] != 'hidden') {
                   echo $userField['title'] . ': ' . $userField['value'] . $li;
                   ?>
                   <span class="values vm2<?php echo '-' . $userField['name'] ?>" ><?php echo $this->escape($userField['value']) ?></span>
                   <?php if ($userField['name'] != 'title' and $userField['name'] != 'first_name' and $userField['name'] != 'middle_name' and $userField['name'] != 'zip') { ?>
                       <br class="clear" />
                  <?php
                   }
               }
                }
                ?>


I'm hoping some wizkid can help me out. ;-)
Title: Re: Editing Customer registration email
Post by: MaHe29 on January 30, 2012, 12:43:18 PM
I've edited the code like this. I'm not sure if 100% correct, but it seems to work

                foreach ($this->userFields['fields'] as $userField) {
               if (!empty($userField['value']) && $userField['type'] != 'delimiter' && $userField['type'] != 'BT' && $userField['type'] != 'hidden') {echo $userField['title'] . ': ' . $userField['value'] . $li;?><span class="values vm2<?php echo '-' . $userField['name'] ?>" >          <?php if ($userField['name'] != 'title' and $userField['name'] != 'first_name' and $userField['name'] != 'middle_name' and $userField['name'] != 'zip') { ?>                   <?php
                   }
               }
                }
                ?>
Title: Re: Editing Customer registration email
Post by: mojino on February 03, 2012, 11:22:48 AM
Hello Mahe29,
I had the same problem and your code seems to fix it.
Thanks.