marblemsn Posted April 22, 2013 Share Posted April 22, 2013 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 More sharing options...
bellini13 Posted April 22, 2013 Share Posted April 22, 2013 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 More sharing options...
marblemsn Posted April 22, 2013 Author Share Posted April 22, 2013 (edited) 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 April 22, 2013 by marblemsn (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted April 22, 2013 Share Posted April 22, 2013 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 More sharing options...
marblemsn Posted April 23, 2013 Author Share Posted April 23, 2013 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 More sharing options...
bellini13 Posted April 23, 2013 Share Posted April 23, 2013 how many characters do you need? Link to comment Share on other sites More sharing options...
marblemsn Posted April 23, 2013 Author Share Posted April 23, 2013 Hello, Thank you for your response, and your help. I simply need to add all the postcodes in Zone 1 to a Carrier (called - AL, B, BA, BB, BL.......) all way through to WV. I also need to add a carrier called BH, BN, CF........ and so on. TransportSched.pdf Link to comment Share on other sites More sharing options...
bellini13 Posted April 23, 2013 Share Posted April 23, 2013 so please just tell me the max length that you would require? Link to comment Share on other sites More sharing options...
marblemsn Posted April 24, 2013 Author Share Posted April 24, 2013 Hello, The max length needs to be 216 characters. Thank you for your assistance. Link to comment Share on other sites More sharing options...
bellini13 Posted April 25, 2013 Share Posted April 25, 2013 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now