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

Add shopper fields to ask a question/email for price email

Started by comdev, December 17, 2012, 14:26:52 PM

Previous topic - Next topic

comdev

I am using VM 2.0.12f on Joomla 2.5.7 with a Gavick template

We have disabled the "email for price" until you have logged on so anyone clicking this must already be registered and logged on.

I do not want to change the pop up but want to include additional fields already held in the shopper table in the email sent to admin, e.g. company name and address_1/address_2 etc

I am pretty sure I do this in mail_html_question.php and have a override copy in the template html directory.

However while echo $this->user['name'] and echo $this->user['email'] both display the values from the database this doesn't work for other fields.

Does anyone know the syntax to pick up the shopper database values for company and address etc from within this PHP?


bytelord

Hello,

Why you don't add the extra fields you are need under Configuration ->Shopper Fields?

Not sure is what you are searching for, may be i am not understanding what you like to do.
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

comdev

The fields are already there under shopper configuration.

The client wants to see the fields in the ask a question email so he has all the information required in the email without logging on and looking at the user.

Do you know the syntax to make the fields shown in configuration -> Shopper fields appear in the ask a question email

bytelord

Hello,

Assuming that the users has logged in or you could add a new field (explained here): http://forum.virtuemart.net/index.php?topic=104562.0 in you ask a question asking customer number or something similar.

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

comdev

The user will always be logged in at this point

I do not want to add an extra field

I want to include an existing field from the shopper fields list in the email

Any ideas?

bytelord

Hello,

Yes ... just add your field there, if the user is logged in it will work. As you can see when you are logged in the name and the e-mail are pre-filled inside the ask a question, just modify the files with the link i send you and add your pre-existing shopper field :)

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

comdev

Someone suggested the values are in  $_SESSION['auth']

but I can't work out the syntax to retrieve the values to get them to appear in the email

e.g. company, name and address_1/address_2 etc

comdev

Quote from: bytelord on December 17, 2012, 15:21:56 PM
Hello,

Assuming that the users has logged in or you could add a new field (explained here): http://forum.virtuemart.net/index.php?topic=104562.0 in you ask a question asking customer number or something similar.

Regards

I don't want the fields to appear in the popup - the user already know their details
I just want the information sent in the email
I tried the changes here in mail_html_question.php before I posted my question but nothing extra was sent in the email