Jump to content

Add a limit of caracters to product name


Recommended Posts

  • 3 months later...

Easy go to these file

 

 

YOUR-ADMIN-DIRECTORY/themes/default/template/controllers/products/informations.tpl

 

look for 

<div class="col-lg-5">
{include file="controllers/products/input_text_lang.tpl"
		languages=$languages
input_class="{$class_input_ajax}{if !$product->id || Configuration::get('PS_FORCE_FRIENDLY_PRODUCT')}copy2friendlyUrl{/if} updateCurrentText"
	input_value=$product->name
		input_name="name"
			required=true
			}
</div>

you need add a maxlenght for example 20 

		<div class="col-lg-5">
			{include file="controllers/products/input_text_lang.tpl"
				languages=$languages
				input_class="{$class_input_ajax}{if !$product->id || Configuration::get('PS_FORCE_FRIENDLY_PRODUCT')}copy2friendlyUrl{/if} updateCurrentText"
				input_value=$product->name
				input_name="name"
                maxlength=20
				required=true
			}
		</div>
  • Like 2
Link to comment
Share on other sites

 

Easy go to these file

 

 

YOUR-ADMIN-DIRECTORY/themes/default/template/controllers/products/informations.tpl

 

look for 

<div class="col-lg-5">
{include file="controllers/products/input_text_lang.tpl"
		languages=$languages
input_class="{$class_input_ajax}{if !$product->id || Configuration::get('PS_FORCE_FRIENDLY_PRODUCT')}copy2friendlyUrl{/if} updateCurrentText"
	input_value=$product->name
		input_name="name"
			required=true
			}
</div>

you need add a maxlenght for example 20 

		<div class="col-lg-5">
			{include file="controllers/products/input_text_lang.tpl"
				languages=$languages
				input_class="{$class_input_ajax}{if !$product->id || Configuration::get('PS_FORCE_FRIENDLY_PRODUCT')}copy2friendlyUrl{/if} updateCurrentText"
				input_value=$product->name
				input_name="name"
                maxlength=20
				required=true
			}
		</div>

 

Thank you.

 

Perfect

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...