Yii2 message extract yii category only - internationalization

I'm trying to get i18n of my Yii2 application. I have followed an article's instructions but it only extracts the message of "yii" category only. I could not able to make it to extract "app" category like those found in some string output such as:
\yii::t('app','Some message text');
What is the problem?

Related

How to add php script to forward a copy of a form

Currently using Joomlashine JSN Uniforms on a beta site. I need to send a duplicate submission to another email address. However, JSN Uniforms canot do this ATM, but there is Script section in form admin panel which includes
Custom Scripts (PHP) called on form processing
The $html string contains the HTML code of the form. You can modify it by adding a PHP script below. Remember to not include the tags.
On form Process
The $post variable contains $_POST data of the form. You can modify it by adding a PHP script below, before it is added to the database. Remember to not include the tags.
After form has been processed
The $post variable contains $_POST data of the form. You can modify it by adding a PHP script below, after form been processed successfully. Remember to not include the tags.
Form Setup
Name
email
subject
department (pulldown) 1. Sales & Service 2. Training & Standards
Message
send
Department: Sales & Service has 2 email addresses (at the moment Uniforms can only assign 1 email address
user1#company.com
user2#companny.com
is there a script I can use to have the submitted form send to the Department user2#company.com and have the form sent to user1#company.com
problem resolved by not messing around with Joomla but adjusting the email service to forward/alias to one address and simply setup Outlook client for each use for the primary email address

How to call a customly created url in magento

I have added one field in backend for adding url for Faq Post and successfully saved to the database.But I`m not sure how to call it back the url to display that particular post.My requirement is to generate a url for each faq categories post and have separate link to access them.
For example .If my faq category is Test and particular post in that category is test123.I want to generate link to access test123 something similar to {mywebsite}/faq/{faq_category}/{faq_post}.Please help me.
You need to Use "Url rewrite Management" when you save url in magento then also save url in url rewrite.
You need to save in url table following fields:
id_path = "faq/{faq_category_id}/{faq_post_id}"
request path ="faq/{faq_category}/{faq_post}"
target path = "faq/index/view/cat/{faq_category_id}/post/{faq_post_id}"
you need to create controller View action in indexController of your module.
you can get parameter like this :
$category_id = $this->getRequest()->getParam('cat');
$post_id = $this->getRequest()->getParam('post');
now run url {mywebsite}/faq/{faq_category}/{faq_post}

Laravel pagination get variables

I have a page that list apartments depending on book dates like this
mypage.com/finder?date-from=2011-03-04&date-to=2011-03-12
Everything is right, I am getting the date-from and date-get from the url and searching the database with those values. The problem is when I paginate and I click to go to another page the url changes to.
mypage.com/finder?page=9
and get an error Value must be provided
The correct url must be
mypage.com/finder?date-from=2011-03-04&date-to=2011-03-12&page=9
I am using paginate at the controller and $searchResult->links(); to generate the links
What can I do pass the date values from page to page so the pagination works?
Thanks
If you want to tack on existing query string data, use this:
$searchResult->appends(array(
'date-from' => Input::get('date-from'),
'date-to' => Input::get('date-to'),
));
Read the docs: Appending To Pagination Links.
You can shorten that a little:
$searchResult->appends( Input::only('data-from', 'date-to') );
which ends up being the same thing.
you can do this using the 'appends' feature. There are examples in the documentation: http://laravel.com/docs/pagination

can anyone tell me how to do seo friendly url in laravel 3

i am using laravel 3 for my web application, i know how to route and all that stuff,it is seo friendly but i want to fetch data from textbox and include that in URL.
i want to include "java-complete-referance "` from textbox to URL.
like in search bar user enters for java complete rerence and i want to pass that data to route and url should be like myweb.com/catagory/books/java-complete-referance.
laravel form having get and post option but how to pass that form data to route's get or post method and display that textbox value in url
thanx in advance.
your Route:
Route::get('category/(:any)/(:any)', array( 'uses' => 'Articles#show'));
now in your route get the category id by the name, and get the article id by the title(ofcourse you need to make sure that the title is uniqe when creating)
if you want to make search is the same.. get the category id by the name and get the search string from title (make some function to replace '-' by space)
public function Show($category_id,$article_title){
}

Is it possible to show the order details sent to customer via email in a separate page (Magento)?

Is it possible to show the order details of last processed order, such as
Item Sku Qty Subtotal
in a separate page?
I tried adding the order details section from frontend/base/default/template/email/order/items/order/default.phtml in a separate cms page, by adding {{layout handle="sales_email_order_items" order=$order}} to it.
But, when I run this cms page after order being placed, it shows the following error:
Fatal error: Call to a member function getAllItems() on a non-object in D:\wamp\www\magento\app\design\frontend\base\default\template\email\order\items.phtml
Is this actually possible?
This is possible.. its already present in the magento system, when user places an order successfully they are shown with order number and a link to order details page.
the link to order page is like http://www.example.com/sales/order/view/order_id/25/
we can make system to be redirected directly to this page to accomplish this task.
the only this we needed is the order id this can be get using
Mage::getSingleton("checkout/session")->getLastOrderId();
Yes, most things are possible. You'd have to write your own module, with your own controller which would serve up your own template. There you can load up an order and display whatever you want.
Obviously, that isn't the answer you are hoping for, but your question isn't specific, and writing out how to accomplish what you want could easily take an entire blog article.

Resources