Subject Line in "Contact us for information" emai
The email that I get when someone sends a "Contact us for more information" email only contains the variants and not the product name or product code.
Shouldn't the email include the product name and product code?
Thanks
Jim
Please Log in or Create an account to join the conversation.
You're the first one asking for the opposite since then
You can remove the code:
if($product->product_type=='variant' && empty($product->product_name)){
$product = $class->get((int)$element->product_parent_id);
}
in the file components/com_hikashop/controllers/product.php and that will use the product name instead of the variant name.
Please Log in or Create an account to join the conversation.
Actually, what I would like to see there is exactly the same as appears on the product page, productname and variants
See: www.potluckceramics.ca/index.php/catalog.../category_pathway-22
It would also be helpful to see the product code in the message somewhere.
Jim
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
But it might be an interesting challenge!!
Thanks
Jim
Please Log in or Create an account to join the conversation.
You can remove the code:
if($product->product_type=='variant' && empty($product->product_name)){
$product = $class->get((int)$element->product_parent_id);
}
in the file components/com_hikashop/controllers/product.php and that will use the product name instead of the variant name.
Sorry, Nicolas. I removed that code from the product.php file, but the subject line still contains the variants not the product name.
I also tried to modify the code to show the line:
About: Product-Name - variants
but I could only get the line to sow the product-ID on the About line.
I find it rather surprising that the message does not contain exactly the same text as is shown in the title of the product page. There is no way, at the moment, to see what page the message was sent from.
The clients really want this, and at the moment I'm stumped.
Jim
Please Log in or Create an account to join the conversation.
just change the line:
if($product->product_type=='variant' && empty($product->product_name)){
to:
if(true){
so that it always uses the variant name.
Please Log in or Create an account to join the conversation.
For the message from the page
www.potluckceramics.ca/index.php/catalog...90-yellow-29-cm-wide
They want to see
Subject: A contact request has been made for the product 'Bowl with edge: Yellow - 29 cm wide'
and not just
Subject: A contact request has been made for the product 'Yellow - 29 cm wide'
because there are several products with the Yellow 29 variants.
Also I was able to change the body to show the product-id after About:
See
From Address :
.ca
From Name : jswift
About : 3790
But I would like to know how to show the product-code there instead of the product-id. I cannot see where the function is getting the product information on the page from?
The client wants to be able to identify the page from which the message is sent, but currently that's not possible.
Many thanks
Jim
Please Log in or Create an account to join the conversation.
$variant = $class->get((int)$element->product_parent_id);
$subject = JText::sprintf('CONTACT_REQUEST_FOR_PRODUCT',$product->product_name.': '.$variant->product_name);
instead of:
if($product->product_type=='variant' && empty($product->product_name)){
$product = $class->get((int)$element->product_parent_id);
}
if(!empty($product)){
$subject = JText::sprintf('CONTACT_REQUEST_FOR_PRODUCT',$product->product_name);
}
The product code of the product will be in $product->product_code and the variant product code will be in $variant->product_code
Please Log in or Create an account to join the conversation.
Just in case others might be interested the code (in product.php) is now:
if(!empty($element->product_id)){
$class = hikashop_get('class.product');
$product = $class->get((int)$element->product_id);
$variant = $class->get((int)$product->product_parent_id);
$subject = JText::sprintf('CONTACT_REQUEST_FOR_PRODUCT',$product->product_code.': '.$variant->product_name.' - '.$product->product_name);
}
This gives the following sample subject line:
Subject: A contact request has been made for the product 'RBT-Y-60: Breakfast Cup - Yellow Bear Tracks'
Thanks very much for the help, Nicolas.
Jim
Please Log in or Create an account to join the conversation.
I Allways recieve a message with subejct line "A contact request has been made"
Please how can i add product_code and product_name to the email subject ?
Thank you
Please Log in or Create an account to join the conversation.
I Allways recieve a message with subejct line "A contact request has been made"
Please how can i add product_code and product_name to the email subject ?
Thank you
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
new.deltakwadrant.net/index.php?option=c...ry_pathway=0&lang=en
I think i have the subject message just "A contact request has been made" from the beginning of instaling hikashop
I already asked for extras subject line in another thread, because i didnt know the product name should be added automatically.
Please Log in or Create an account to join the conversation.
Please edit the file "show" of the view "product" via the menu Display->Views and change the line:
echo $this->cart->displayButton(JText::_('CONTACT_US_FOR_INFO'),'contact_us',$params,hikashop_completeLink('product&task=contact&cid='.$this->row->product_id),'window.location=\''.hikashop_completeLink('product&task=contact&cid='.$this->row->product_id).'\';return false;');
to:
echo $this->cart->displayButton(JText::_('CONTACT_US_FOR_INFO'),'contact_us',$params,hikashop_completeLink('product&task=contact&cid='.$this->element->product_id),'window.location=\''.hikashop_completeLink('product&task=contact&cid='.$this->element->product_id).'\';return false;');
That should solve the problem.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.