Osclass Support Forums
Osclass theme support => Veronika Osclass Responsive Theme => Topic started by: Plamen Karolev 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
// 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:
// 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
$('.add_item .price-wrap .enter input#price').attr('readonly', false).attr('placeholder', '<?php echo osc_esc_js('Price', 'veronika'); ?>');;
Change to:
$('.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.
-
@Plamen
What is difference between codes?
-
@Plamen
What is difference between codes?
<?php echo osc_esc_js('Price', 'veronika'); ?>
<?php echo osc_esc_js(__('Price', 'veronika')); ?>
-
For required fields:
Change this code in item-post.php & item-edit.php:
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:
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')); ?>"
}
},
-
@Plamen
Nice catch, thanks, will fix it in theme.