Contact us for information

  • Posts: 251
  • Thank you received: 2
12 years 3 months ago #36858

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.

  • Posts: 81677
  • Thank you received: 13102
  • MODERATOR
12 years 3 months ago #36969

Hi,

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

Isn't that the case on your website ?

Last edit: 12 years 3 months ago by nicolas.

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

  • Posts: 251
  • Thank you received: 2
12 years 3 months ago #36971

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.

  • Posts: 81677
  • Thank you received: 13102
  • MODERATOR
12 years 3 months ago #36975

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.

  • Posts: 251
  • Thank you received: 2
12 years 3 months ago #36976

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.

  • Posts: 251
  • Thank you received: 2
12 years 3 months ago #36979

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.

  • Posts: 251
  • Thank you received: 2
12 years 3 months ago #36987

Doesn't works!

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

  • Posts: 81677
  • Thank you received: 13102
  • MODERATOR
12 years 3 months ago #37104

Could you try to replace the whole block of code with that:

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: 12 years 3 months ago by nicolas.

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

  • Posts: 251
  • Thank you received: 2
12 years 3 months ago #37197

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.

  • Posts: 81677
  • Thank you received: 13102
  • MODERATOR
12 years 3 months ago #37328

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.

  • Posts: 251
  • Thank you received: 2
12 years 3 months ago #37414

Perfect!

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

  • Posts: 96
  • Thank you received: 14
12 years 3 months ago #37427

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.

  • Posts: 251
  • Thank you received: 2
12 years 3 months ago #37432

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.

  • Posts: 218
  • Thank you received: 6
12 years 3 months ago #37440

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.

  • Posts: 81677
  • Thank you received: 13102
  • MODERATOR
12 years 3 months ago #37448

Yes.

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

  • Posts: 218
  • Thank you received: 6
12 years 3 months ago #39600

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.

  • Posts: 81677
  • Thank you received: 13102
  • MODERATOR
12 years 3 months ago #39770

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.089 seconds
Powered by Kunena Forum