News:

Support the VirtueMart project and become a member

Main Menu

Email Subject Line

Started by Mongrel, June 06, 2013, 06:33:37 AM

Previous topic - Next topic

Mongrel

Hi all,

So I created a couple of Order Statuses as I need some others for my production line, but when the email is sent to the customer to advise them, there is a subject line in the email of   

COM_VIRTUEMART_MAIL_SUBJ_SHOPPER_A

I have tried adding this to the Overrides, but it made no difference.  In fact, it can't be found when I search.

Any ideas?

Mongrel

OK... So I have tried my hardest to figure this out - and I can't!  I am at my wits end, but it's frustrating as it looks very bad from the customers point of view.

if anyone can help, I would be grateful.

AH

#2
I guess you added the new order type with order status of "A"

In the email subject you may note that teh subject is using the order status as a component of the mail subject:-

} else {
             $this->subject = JText::sprintf('COM_VIRTUEMART_MAIL_SUBJ_SHOPPER_'.$orderDetails['details']['BT']->order_status, $vendor->vendor_store_name, strip_tags($currency->priceDisplay($orderDetails['details']['BT']->order_total, $currency)), $orderDetails['details']['BT']->order_number );
             $recipient = 'shopper';
          }


For each new status, you need to create a language override for it

Joomla-Admin>EXTENSIONS->LANGUAGE MANAGER-> OVERRIDES>NEW

e.g Status A = Wating for Collection

Add an override in VM for the customer and the vendor email status(actaully a new language entry)

Language Constant = COM_VIRTUEMART_MAIL_SUBJ_SHOPPER_A
Language Constant = COM_VIRTUEMART_MAIL_SUBJ_VENDOR_A

Text:- Waiting for Collection

And there you have it!

This was also news to me until you asked the question ( I need to do this for my live site soon - so I will now know what I need to do, in VM1.1 it used the description, but this is no use now VM2 is multi-lingual )
Regards
A

Joomla 4.4.5
php 8.1

Mongrel

I wished it was that easy!  The overides didn't work.

I just now managed to track it down.

I had to edit the actual language file called      en-GB.com_virtuemart.ini      in the language folder.  Overrides just did not work.

AH

If you have edited the language files - these will get overwritten next update

Were you editing in Joomla?

sitename\language\overrides\en-GB.override.ini
Regards
A

Joomla 4.4.5
php 8.1

Mongrel

Quote from: Hutson on June 13, 2013, 11:14:26 AM
If you have edited the language files - these will get overwritten next update

Were you editing in Joomla?

sitename\language\overrides\en-GB.override.ini

Yes I was.  I tried both doing it manually and doing it in the Admin Console - but both failed.

I know it will get overwritten - but right now, there is no other way out.

AH

Try copying this override file to the admin languages override (with just the email elements in) - I think this would sort it out and prevent updats deleting your changes
Regards
A

Joomla 4.4.5
php 8.1

Mongrel

Quote from: Hutson on June 13, 2013, 13:35:19 PM
Try copying this override file to the admin languages override (with just the email elements in) - I think this would sort it out and prevent updats deleting your changes

Sorry mate - I don't follow?  What file to where?

AH

Apologies, was busy when I posted the response.

Looks like there is  a duplication of these language elements in the admin language folder and the site language folder!
option 1
Copy your languages/overrides folder to the
administrator/languages/

And edit as required

Option 2
Using language manager for overrides.

(See the how to page - link below)
In step 3 on the info page (arrow 1) Chose Administrator
http://www.ostraining.com/blog/joomla/languge-manager/

Add the overrides into the administrator view.

This process creates a new folder administrator/languages/overrides with a file:-
en-GB.override.ini

Regards
A

Joomla 4.4.5
php 8.1