Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Change subject line in "Ask a question about this product"
 
Reply
   X-Cart forums > X-Cart 4 > Changing and adding new features
 
Thread Tools Search this Thread
  #1  
Old 04-11-2014, 07:39 PM
 
anandat anandat is offline
 

X-Adept
  
Join Date: Jan 2004
Posts: 912
 

Arrow Change subject line in "Ask a question about this product"

Hello,
when ever some one send query through "Ask a question about this product". we are getting mails like "yoursite.com: Someone asked a question about product"
Actually it should be like "Question regarding PRODUCT NAME(PRODUCT CODE at yoursite.com
This will make more sense.

Can any one tell me how to achieve this ?
__________________
X-Cart: 4.7.7 LIVE
Skin:Ultra by xcartmods.co.uk
X-cart Modules: | ACR, Rich Google Search, Customer Testimonials | Cloud Search, | Websitecm: CDSEO (2.1.9)
---------------
Server: Linux
php: 5.3
mysql: 5.0.89
----------------
Reply With Quote
  #2  
Old 04-11-2014, 11:17 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,825
 

Default Re: Change subject line in "Ask a question about this product"

Look at /common_files/mail/html/ask_question.tpl

And the language variables are:
eml_someone_ask_question
eml_someone_ask_question_at
eml_someone_ask_question_subj
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote

The following user thanks totaltec for this useful post:
anandat (04-12-2014)
  #3  
Old 04-12-2014, 07:26 AM
 
anandat anandat is offline
 

X-Adept
  
Join Date: Jan 2004
Posts: 912
 

Default Re: Change subject line in "Ask a question about this product"

Hi Mike,
Thanks for the info.
Since I just wanted to change subject line
I edited the label "eml_someone_ask_question_subj" to
Question regarding {{product_name}} (product code: {{productid}}) at {{STOREFRONT}}

But it does't populate the variables & in email I am getting subject line like "mysitename.com: Question regarding {{product_name}} (product code: {{productid}}) at {{STOREFRONT}}

what I am missing out ?
__________________
X-Cart: 4.7.7 LIVE
Skin:Ultra by xcartmods.co.uk
X-cart Modules: | ACR, Rich Google Search, Customer Testimonials | Cloud Search, | Websitecm: CDSEO (2.1.9)
---------------
Server: Linux
php: 5.3
mysql: 5.0.89
----------------
Reply With Quote
  #4  
Old 04-12-2014, 07:48 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,825
 

Default Re: Change subject line in "Ask a question about this product"

When you use variables in a language entry, they have to be translated by the template that the language variable is used in. So I can put whatever I want between brackets {{whatever}} but in the actual template where this language variable is called, I need to tell the engine what to do with it.

In common_files/mail/html/ask_question.tpl you can see an example of this in action:
{$lng.eml_someone_ask_question|substitute:"STOREFR ONT":$current_location:"productid":$productid:"pro duct_name":$product}

So in your case you are using a language variable that is called in common_files/mail/html/ask_question_subj.tpl

You need to add the
|substitute:"STOREFRONT":$current_location:"produc tid":$productid:"product_name":$product

into the language variable call in that template.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote

The following user thanks totaltec for this useful post:
anandat (04-12-2014)
  #5  
Old 04-12-2014, 07:41 PM
 
anandat anandat is offline
 

X-Adept
  
Join Date: Jan 2004
Posts: 912
 

Default Re: Change subject line in "Ask a question about this product"

Hi Mike,
Thanks a lot. It's working now like a charm
I don't know why x-cart team have not done such a way. We are receiving many inquires via "ask a question" form now it will be very easy to manage the questions as it's more effective & time saver method.

If any one wants to achieve this. just open your \skin\common_files\mail\ask_question_subj.tpl & replace the entire code with
PHP Code:
{config_load file="$skin_config"}{$config.Company.company_name}:{$lng.eml_someone_ask_question_subj|substitute:"STOREFRONT":$current_location:"productid":$productid:"product_name":$product

Now find language label eml_someone_ask_question_subj & replace with this code
PHP Code:
Question about {{product_name}} product code: {{productid}} 
__________________
X-Cart: 4.7.7 LIVE
Skin:Ultra by xcartmods.co.uk
X-cart Modules: | ACR, Rich Google Search, Customer Testimonials | Cloud Search, | Websitecm: CDSEO (2.1.9)
---------------
Server: Linux
php: 5.3
mysql: 5.0.89
----------------
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Changing and adding new features


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:31 PM.

   

 
X-Cart forums © 2001-2018