Jump to content

More Characters for postcode


Recommended Posts

Hello,

 

I have a Prestashop 1.4.9 site.

 

I have added carriers but the number of characters to the field for postcodes is limited to 64 characters.

 

Is there a way of extending this, and if so how can I find the file where the code is located. I have tried to use Firebug, but with no experience in programming, I am having alot of difficulty.

 

Any help would be appreciated.

 

Thanks

Link to comment
Share on other sites

you said postcode, but did you mean city?

 

postcode is limited to 12, and I can't imagine you would need more than 64 for a postcode.

city is limited to 64, and you would need to change a couple of things

1) the ps_address database table. you would need to increase the size of the city column

2) the Address class, has a size validation of 64. you would need to increase that number

3) your themes's address.tpl file might have a maxlength defined for the input field

Link to comment
Share on other sites

Hello Bellini,

 

It is the Carrier.

 

Customers are to recognize and pick their postcode from the list, and select it. My company of hauliers will deliver to those postcodes for a set price (the customer does not need to know this). However, the carrier can only take 64 characters, as it shows on the 'Carrier Photo.

 

The customer sees the post code, but there are many other that need to be put on.

 

I have opened up the Classes / carrier.php file. I cannot see if this is the right place.

 

Having used Firebug, I have discovered that the 'label' is too short!

 

<label for="id_carrier119">

Postcode - AL, B, BA, BB, BD, BL, BR, BS, CB, CH, CR </label>

 

I have no idea what the above is, but can it be extended?

 

Your help would be appreciated.

 

Thanks

Carrier Photo.pdf

Screenshot.pdf

Edited by marblemsn (see edit history)
Link to comment
Share on other sites

The postcode is limited 12 in Prestashop. I assume you are using a module for this carrier, perhaps they have created an override or customized to support 64. You should really contact that modules's author for additional assistance, this does not appear to be related to core Prestashop functionality.

Link to comment
Share on other sites

Hello,

 

Is there any way that I can extend the name of the carrier to more than 64 characters. It is just the name of the carrier that needs extending as it shows the postcodes that can be listed for the stated price.

 

Thank you.

Link to comment
Share on other sites

1) you have to alter the ps_carrier table, and increase the size of the name column to 216

2) the Carrier class, has a size validation of 64. you would need to increase that number to 216

3) then anywhere you display the Carrier name (order detail, invoice, checkout) would likely need to account for this large name. If you try to put a 216 character value, the page display is likely going to look terrible.

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...