Support Forum

Every time that you post a problem, PLEASE add the Joomla and the extension's versions and revisions (for example: Joomla 3.3.6, Contact Enhanced 3.3.5), PHP version and Server's Operating System. If you only manage only one site it is easier if you edit your profile and just add that information to your signature. Don't forget to add a detailed description of the problem. If possible, write down all steps to simulate the problem.

Before submitting a new post, PLEASE make sure you are running the latest version, test in different browsers (IE, FF, Chrome,..) and clear Joomla and browser's cache after every change you make.

Also, most questions are already answered in our FAQ and in iFAQ and Contact Enhanced documentation pages.

× Contact Enhanced is a contact component manager created to replace Joomla! core contacts component and add lots of advantages and new features (see Features ) and it offers many plugins and modules for several different purposes,
Product page | Documentation Page

Use in VirtueMmart

12 years 2 months ago #9796 by prismalight
Hi,
virtuemart has a function "ask a question" in the product detail page. How can I call the ec plugin or modul instead of the own form?
this is how it looks on virtuemart .. how can i pass the attributes?

Is there a way to use the com_contact module for all inquiries?
Theproduct sku or / and a link of the product should be send in the body message of contact_form.
I would recommend to use for all email request the mod_contact as this can be easily modified like "captcha" and is one central module.

productdetails/tmpl/default.php

change this
$url = JRoute::_('index.php?option=com_virtuemart&view=productdetails&task=askquestion&virtuemart_product_id='.$this->product->virtuemart_product_id.'&virtuemart_category_id='.$this->product->virtuemart_category_id.'&tmpl=component');

that would be great if this can be possible

Please Log in or Create an account to join the conversation.

12 years 2 months ago #9812 by douglas
Dear prismalight,

You will have to create Text Custom Fields for the Product ID and for the Category ID and set the to Hidden.

Then you would have to create a link to Contact Enhanced instead and add variables that correspond to the custom fields you've just created. The link would look something like this:

$url = JRoute::_('index.php?option=com_contactenhanced&view=contact&id=CONTACT_ID&cf_ID1='.$this->product->virtuemart_product_id.'&cf_ID2='.$this->product->virtuemart_category_id.'&tmpl=component');

The CONTACT_ID is the Contact Enhanced -> Contact ID.
ID1 is the ID for the Custom Field you've created for the Product ID
ID2 is the ID for the Custom Field you've created for the Category ID

OPTIONAL (a bit more complicated): You may want to create a HTML Email template for this contact in order to retrieve the information and add to your own links using the {post: cf_ID1} and {post: cf_ID2}
Please read this article:
ideal.fok.com.br/joomla-extens...s/75-html-template-system.html

Best regards,

Please Log in or Create an account to join the conversation.

12 years 2 months ago #9955 by prismalight
Thanks for the great solution. I changed it a bit now product sku and name are shown in the contact form.
great work and support

Please Log in or Create an account to join the conversation.

11 years 10 months ago #11359 by Hisslink
I would also like to do this, but this description didn't work out. It still links to the old "ask a question" form, even though I updated productdetails/tmpl/default.php.
Do I need to change any more files?

Please Log in or Create an account to join the conversation.

11 years 10 months ago #11360 by douglas
Dear Hisslink,

First of all this thread is in the wrong category and I'll chnage it now to Contact Enhanced.

Second, If you change the link in VirtueMart it should be changed in the HTML output. Please be sure that you cleaned your Joomla and browser cache.

@prismalight,
Do you have any tips for this user?
I do not use VirtueMart, so it is a bit harder to provide support for this hack.

Best regards,

Please Log in or Create an account to join the conversation.

11 years 10 months ago #11369 by prismalight
in folder public_html/components/com_virtuemart/views/productdetails/tmpl make a copy of the default.php rename it to "mydefault" and change the JRoute like this $url = JRoute::_('index.php?option=com_contactenhanced&view=contact&id=31&cf_19='.$this->product->product_sku.'&cf_20='.$this->product->product_name.'&tmpl=component');
go to VM admin->configuracion->templates->and choose "mydefault" at line product layout ..
clean browser and server (joomla) cache

Please Log in or Create an account to join the conversation.

11 years 10 months ago #11387 by Hisslink
Works like a charm! Thanks!

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum

Copyright © 2018 IdealExtensions.com. All Rights Reserved.

This site is not affiliated with or endorsed by the Joomla!™ Project. It is not supported or warranted by the Joomla!™ Project or Open Source Matters™. The Joomla!™ logo is used under a limited license granted by Open Source Matters™, the trademark holder in the United States and other countries.
We may collect your IP address and your browser's User Agent string while using our site for security reasons and deriving aggregate information (analytics). This information is retained for a minimum of 1 and a maximum of 24 months.
Feedback