Price slug does not change when you change the language
« on: January 31, 2017, 02:03:20 PM »
In Post item page and Edit item Price slug does not change when you change the language.

You have to modify item-post.php

From row:283-286

Code: [Select]
    // JAVASCRIPT FOR PRICE ALTERNATIVES
    $(document).ready(function(){
      $('input#price').attr('autocomplete', 'off');         // Disable autocomplete for price field
      $('input#price').attr('placeholder', '<?php echo osc_esc_js('Price''veronika'); ?>'); 

Change to:

Code: [Select]
// JAVASCRIPT FOR PRICE ALTERNATIVES
    $(document).ready(function(){
      $('input#price').attr('autocomplete', 'off');         // Disable autocomplete for price field
      $('input#price').attr('placeholder', '<?php echo osc_esc_js(__('Price''veronika')); ?>');

Row: 310

Code: [Select]
   
$('.add_item .price-wrap .enter input#price').attr('readonly', false).attr('placeholder', '<?php echo osc_esc_js('Price''veronika'); ?>');;


Change to:

Code: [Select]
   
$('.add_item .price-wrap .enter input#price').attr('readonly', false).attr('placeholder', '<?php echo osc_esc_js(__('Price''veronika')); ?>');;


You must make this change in item-edit.php.


« Last Edit: January 31, 2017, 02:05:39 PM by Plamen Karolev »

*

MB Themes

Re: Price slug does not change when you change the language
« Reply #1 on: January 31, 2017, 02:30:28 PM »
@Plamen
What is difference between codes?
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

Re: Price slug does not change when you change the language
« Reply #2 on: January 31, 2017, 02:33:26 PM »
@Plamen
What is difference between codes?


Code: [Select]
<?php echo osc_esc_js('Price''veronika'); ?> 
Code: [Select]
<?php echo osc_esc_js(__('Price''veronika')); ?>

Re: Price slug does not change when you change the language
« Reply #3 on: January 31, 2017, 03:05:15 PM »
For required fields:

Change this code in item-post.php & item-edit.php:

 
Code: [Select]
messages: {
          "title[<?php echo osc_current_user_locale(); ?>]": {
            required: "<?php echo osc_esc_js(__('Title: this field is required.')); ?>",
            minlength: "<?php echo osc_esc_js(__('Title: enter at least 5 characters.')); ?>"
          },

          "description[<?php echo osc_current_user_locale(); ?>]": {
            required: "<?php echo osc_esc_js(__('Description: this field is required.')); ?>",
            minlength: "<?php echo osc_esc_js(__('Description: enter at least 10 characters.')); ?>"
          },

          term: {
            required: "<?php echo osc_esc_js(__('Location: select country, region or city.')); ?>",
            minlength: "<?php echo osc_esc_js(__('Location: enter at least 3 characters to get list.')); ?>"
          },

          catId: "<?php echo osc_esc_js(__('Category: this field is required.')); ?>",

          "photos[]": {
             accept: "<?php echo osc_esc_js(__('Photo: must be png,gif,jpg,jpeg.')); ?>"
          },


          sPhone: {
            required: "<?php echo osc_esc_js(__('Phone: this field is required.')); ?>",
            minlength: "<?php echo osc_esc_js(__('Phone: enter at least 6 characters.')); ?>"
          },

          contactName: {
            required: "<?php echo osc_esc_js(__('Your Name: this field is required.')); ?>",
            minlength: "<?php echo osc_esc_js(__('Your Name: enter at least 3 characters.')); ?>"
          },

          contactEmail: {
            required: "<?php echo osc_esc_js(__('Email: this field is required.')); ?>",
            email: "<?php echo osc_esc_js(__('Email: invalid format of email address.')); ?>"
          }
        },

With this:

 
Code: [Select]
    messages: {
          "title[<?php echo osc_current_user_locale(); ?>]": {
            required: "<?php echo osc_esc_js(__('Title: this field is required.','veronika')); ?>",
            minlength: "<?php echo osc_esc_js(__('Title: enter at least 5 characters.','veronika')); ?>"
          },

          "description[<?php echo osc_current_user_locale(); ?>]": {
            required: "<?php echo osc_esc_js(__('Description: this field is required.','veronika')); ?>",
            minlength: "<?php echo osc_esc_js(__('Description: enter at least 10 characters.','veronika')); ?>"
          },

          term: {
            required: "<?php echo osc_esc_js(__('Location: select country, region or city.','veronika')); ?>",
            minlength: "<?php echo osc_esc_js(__('Location: enter at least 3 characters to get list.','veronika')); ?>"
          },

          catId: "<?php echo osc_esc_js(__('Category: this field is required.','veronika')); ?>",

          "photos[]": {
             accept: "<?php echo osc_esc_js(__('Photo: must be png,gif,jpg,jpeg.','veronika')); ?>"
          },


          sPhone: {
            required: "<?php echo osc_esc_js(__('Phone: this field is required.','veronika')); ?>",
            minlength: "<?php echo osc_esc_js(__('Phone: enter at least 6 characters.','veronika')); ?>"
          },

          contactName: {
            required: "<?php echo osc_esc_js(__('Your Name: this field is required.','veronika')); ?>",
            minlength: "<?php echo osc_esc_js(__('Your Name: enter at least 3 characters.','veronika')); ?>"
          },

          contactEmail: {
            required: "<?php echo osc_esc_js(__('Email: this field is required.','veronika')); ?>",
            email: "<?php echo osc_esc_js(__('Email: invalid format of email address.','veronika')); ?>"
          }
        },
« Last Edit: January 31, 2017, 03:07:15 PM by Plamen Karolev »

*

MB Themes

Re: Price slug does not change when you change the language
« Reply #4 on: January 31, 2017, 03:45:34 PM »
@Plamen
Nice catch, thanks, will fix it in theme.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots