Find Jobs
Hire Freelancers

Drupal Views: only token replacement on field's original text during rewrite

€30-250 EUR

Ditutup
Disiarkan sekitar 8 tahun yang lalu

€30-250 EUR

Dibayar semasa penghantaran
This is a small part for insurance website and we are looking for future cooperation (sms integration, product view display and more). Goal: View have to replace partial text of a field with any token available in the view. For example taxonomy term custom field has text “This term [name] is for order nr [order_number].” and views shall replace token (eg [name] and [order_number]) with proper replacement (term name and order number in this example). The result have to be: “This term TEST_TERM is for order nr 2016-01.” To reproduce initial situation (to start from): (it can be done on any Drupal installation, but we need it to work on Erpal Platform) Install ERPAL Platform create a vendor during installation create a customer after installation (for Quote saving, see below) create a product after installation (for Quote saving, see below) create vocabulary, (eg Test Vocabulary) add 'Long text' field type: (field_test_field) to test_vocabulary create TEST TERM term with text “This term [name] is for order nr [order_number].” in field_test_field. add 'Term Reference' field of type 'Test Vocabulary' to Quote (admin/commerce/config/order-types/manage/quote/fields) create a Quote (use created product and customer) + select term TEST TERM enable Views UI create view (eg 'Taxonomy term view'): of type Text_Vocabulary Add Relatioship: “Taxonomy term: Commerce Order using Term Reference” field Taxonomy term: Name shall be already added add field 'Order Number' add field 'field_test_field'. Under 'Rewrite Results'->'Replacement Patterns' you can see some tokens (eg: [name] == Taxonomy term: Name and [order_number] == Commerce Order: Order number) take a look on the view Issue: Under 'Rewrite Results'->'Replacement Patterns' you can see token [name] == Taxonomy term: Name and [order_number] == Commerce Order: Order number). In textarea 'Text' you can write manually text with token, but we need, that text would come from taxonomy term custom field and token replaces only part of the text (same idea like sending automatic emails to customers).
ID Projek: 10025700

Tentang projek

13 cadangan
Projek jarak jauh
Aktif 8 tahun yang lalu

Ingin menjana wang?

Faedah membida di Freelancer

Tetapkan bajet dan garis masa anda
Dapatkan bayaran untuk kerja anda
Tuliskan cadangan anda
Ianya percuma untuk mendaftar dan membida pekerjaan
13 pekerja bebas membida secara purata €237 EUR untuk pekerjaan ini
Avatar Pengguna
Views Handler is the proper way out. There is also a quick way . Use Views php. Views php will allow you to reformat some fields in a view. You can use this to string replace the token values with the token’s values. You need to add a field in the view of Type Global PHP. Name the field title as taxonomy term field. Then you do the required php operations for replacement. But this as I said this is only a quick but not advisable solution. You should use views handler for this. You can write a module to add your custom views handler using hook_views_data(). function mymodule_views_data() { $data = array( .... ... 'handler' => 'my_custom_views_handler_test', 'click sortable' => TRUE, ), 'sort' => array( 'handler' => 'views_handler_sort', ), 'filter' => array( 'handler' => 'views_handler_filter_string', ), 'argument' => array( 'handler' => 'views_handler_argument_string', ), ), ), ); return $data; } And then you should declare the views handler extending hiews_handler_field You then the replacement code within an override of the render function. class my_custom_views_handler_test extends views_handler_field { function render($values) { $value = $this->get_value($values); // REPLACE THE TOKEN return $this->sanitize_value($value); } } We can also use hook_views_pre_render to override the field's value.
€263 EUR dalam 7 hari
5.0 (183 ulasan)
8.6
8.6
Avatar Pengguna
Hi I work towards providing reliable, relevant and robust IT solutions at most competitive prices to my customers. I ensure 100% customer satisfaction so lets start Thanks
€257 EUR dalam 12 hari
4.8 (296 ulasan)
7.9
7.9
Avatar Pengguna
Hi I have gone through the details of your project and we find it well within our capabilities. I offer a wide range of services, including Web design, PHP/MySQL web application development, Open sources like Joomla, Os-commerce,vBulletin , Zen cart-Drupal , android and IOS , I can create and deliver the project as per the information.I have skilled, expert programmers I'm very excited to assist you in making your Sites successful – please feel free to contact me directly to discuss this position further. Thanks
€247 EUR dalam 10 hari
4.7 (389 ulasan)
8.0
8.0
Avatar Pengguna
Hello, I'm a professional programmer for web programming with php language to build the system website, Besides, I'm also expert in MySQL , HTML,HTML5,CSS, JS I'm always top in Vietnam freelancer https://www.freelancer.com/freelancers/Vietnam/all/ https://www.freelancer.com/u/scriptphp87.html I'm expert development with drupal Would you like discuss more with me? would you like show me your site to need do? I'm understand clearly your requirement and i'm interested your project I'm ready to do it now Nice to meet you Should you require further assistance, feel free to contact me. Thank you
€263 EUR dalam 7 hari
4.6 (201 ulasan)
7.7
7.7
Avatar Pengguna
Hello, Drupal expert here with more than 5 years of experience. I did more than 300 sites in drupal. please let's discuss and proceed. few words... eat drupal, drink drupal sleep drupal,love drupal involve in drupal since drupal 4. expert in developing custom modules, configuration,views, drupal theming. Ensure you regarding quality,standard as per drupal. and we have lot of experience in custom modules and themes with drupal. let me know how can we proceed? Regards
€277 EUR dalam 4 hari
4.8 (52 ulasan)
6.8
6.8
Avatar Pengguna
Hello Sir, We are an Indian development company here. we have checked your posted details here and want more clarification in it, so message us to discuss on it more then we will able to move on it. Thanks
€247 EUR dalam 5 hari
5.0 (41 ulasan)
4.8
4.8
Avatar Pengguna
++ This is my job. I'm ready to begin now. Pm for me. Thanks Looking forward to hear from you, Feel free to talk about this interesting stuff, give us any questions you have to know more about us ;-) Thanks Oleg!
€155 EUR dalam 0 hari
4.5 (44 ulasan)
5.3
5.3
Avatar Pengguna
Hello There, My name is DS, New Zealand based freelance designer/developer here. With more than 12 years of experience i worked for various clients across Australia, New Zealand and UK. Worked on projects ranging from simple to extremely complex and helped clients in achieving better software outcomes. Have had go through the requirements, excited and very keen to work on this project. Strongly believe that me being in NZ, my technical skills along with working in same time will add additional advantage. Why you should consider me? 1. NZ based freelancer, So will be just a call away.  2. Innovative development and testing practices in place such as continuous integration and Agile manifesto. So there will be a definition of done in frequent time frames. 3. You will be working/in contact with the person who is working on the Job. 4. Innovative development and Test practices in place. So we always go live with Zero known defects. 5. Quality is extremely vital for me, Innovative development techniques that i use such as continuous Integration and Delivery add value 5. Competitive pricing strategy. 6. Ongoing Support  PORTFOLIO: Front End/Design Skills HTML4/5 CSS Query AJAX Flash Bootstrap Development Skills PHP Wordpress Joomla Drupal Silver-stripe Python Ruby on Rails DNN Concrete5 .NET Java Frame Works: Magento Shopify MVC Angular JS Open-cart Prestashop
€250 EUR dalam 5 hari
4.9 (6 ulasan)
4.3
4.3
Avatar Pengguna
Hi, READY TO SOLVE IT IMMEDIATELY!! As per your requirement ERPAL platform is used for flexible business solution in Drupal. So i would be glad to work on it if you give ma a chance to prove my expertise. Looking forward to your quickest response. Thanks
€388 EUR dalam 5 hari
5.0 (1 ulasan)
2.8
2.8

Tentang klien

Bendera ESTONIA
Estonia
0.0
0
Ahli sejak Mac 23, 2016

Pengesahan Klien

Terima kasih! Kami telah menghantar pautan melalui e-mel kepada anda untuk menuntut kredit percuma anda.
Sesuatu telah berlaku semasa menghantar e-mel anda. Sila cuba lagi.
Pengguna Berdaftar Jumlah Pekerjaan Disiarkan
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Memuatkan pratonton
Kebenaran diberikan untuk Geolocation.
Sesi log masuk anda telah luput dan telah dilog keluar. Sila log masuk sekali lagi.