Skip to main content

Contact us for information

More
14 years 8 months ago #36858 by Nello
Hello Nicolas,

in the email I get when someone sends a "Contact us for information" email, there is no reference to the product. How can I add?

For Example

www.hidesign.it/it/smart-design/product/...913/radio-cubo-ts522

www.hidesign.it/it/smart-design/product/contact/cid-2913

Thank you!

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

More
14 years 8 months ago - 14 years 8 months ago #36969 by nicolas
Hi,

The name of the product is in the subject of the email.

Isn't that the case on your website ?
Last edit: 14 years 8 months ago by nicolas.

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

More
14 years 8 months ago #36971 by Nello
The subject of the email is

A contact request has been made for the product '%s'

or simply

A contact request has been made

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

More
14 years 8 months ago #36975 by nicolas
I think that the problem comes from the fact that you have variants without names for your products.

Could you replace the line:
$product = $class->get((int)$element->product_parent_id);

by:
$variant = $class->get((int)$element->product_parent_id);
if(!empty($variant->product_name)){
$product = $variant;
}

in the file components/com_hikashop/controllers/product.php and try again ?

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

More
14 years 8 months ago #36976 by Nello
Yes I think too. Infact I note that it works only if the product have no variants...

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

More
14 years 8 months ago #36979 by Nello
Now I get

A contact request has been made for the product ''

www.hidesign.it/test/it/catalogo/product...id-3217/around-clock

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

More
14 years 8 months ago #36987 by Nello
Doesn't works!

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

More
14 years 8 months ago - 14 years 8 months ago #37104 by nicolas
Could you try to replace the whole block of code with that:
Code:
if(!empty($element->product_id)){ $class = hikashop_get('class.product'); $product = $class->get((int)$element->product_id); if(!empty($product)){ if($product->product_type=='variant'){ $parentProduct = $class->get((int)$product->product_parent_id); $class->checkVariant($product,$parentProduct); } if(!empty($product->product_name)){ $subject = JText::sprintf('CONTACT_REQUEST_FOR_PRODUCT',strip_tags($product->product_name)); } } }
Last edit: 14 years 8 months ago by nicolas.

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

More
14 years 8 months ago #37197 by Nello
Thank you so much Nicolas,

now works but I get the name of products without variants

A contact request has been made for the product 'Chair one: '


www.hidesign.it/test/it/catalogo/product...w/cid-3145/chair-one

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

More
14 years 8 months ago #37328 by nicolas
You should add the code:
$db =& JFactory::getDBO();
$db->setQuery('SELECT * FROM '.hikashop_table('variant').' AS a LEFT JOIN '.hikashop_table('characteristic') .' AS b ON a.variant_characteristic_id=b.characteristic_id WHERE a.variant_product_id='.(int)$element->product_id.' ORDER BY a.ordering');
$product->characteristics = $db->loadObjectList();


before the code:
$parentProduct = $class->get((int)$product->product_parent_id);
$class->checkVariant($product,$parentProduct);

That should allow the system to add the characteristic values to the name of the products.
The following user(s) said Thank You: Nello

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

More
14 years 7 months ago #37414 by Nello
Perfect!

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

More
14 years 7 months ago #37427 by protorob

Nello wrote: Perfect!


Che bel sito Nello, complimenti!
Mi rendo conto di quanto sul css devo ancora imparare...
The following user(s) said Thank You: Nello

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

More
14 years 7 months ago #37432 by Nello
Grazie Protorob.
Serve solo un po' di applicazione... ;)

Poi con l'aiuto di Nicolas si riesce a fare praticamente tutto!!! ¦D

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

More
14 years 7 months ago #37440 by woonydanny
I am assuming this will be added to the core extension so when the next update comes it will be included?

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

More
14 years 7 months ago #37448 by nicolas
Yes.

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

More
14 years 7 months ago #39600 by woonydanny
Would actually be better to have in the body of the email sent to the admin:

Product: xxxx
Product Code: xxx
Size (eg whatever the Variant is): White
Colour (eg whatever the Variant is): Large

That way the subject of the email is not excessively long but there is still the information that the admin needs to know to know what product the enquirer is asking about. I need the product code included as the product names dont always make it easy to know what product it is.

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

More
14 years 7 months ago #39770 by nicolas
There is no option for that but it's noted.


We'll convert the email to an editable email like the others so that everyone can have it the way he wants.
The following user(s) said Thank You: protorob

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

Time to create page: 0.250 seconds
Powered by Kunena Forum