Jump to content

Setting a character limit for certain fields?


Recommended Posts

Hey all, new to Prestashop!

Question for you. I have a store that personalizes things. In one of the fields in the store, a customer has a character limit for small items such as a ring for example.

I'm having to call lots of customers back because they don't realize they go over the character limit!

How can I fix this? Do I change this in phpmyadmin?

Thanks!

Link to comment
Share on other sites

If you need the same character limit for all fields, you can add it to the textbox in product.tpl

If you need a different limit per each customization, then you would have to write some specific code.

You can also look into my Attribute Wizard Pro module, it offers many features, one of the is to assign a character limit for textboxes.

It actually uses attributes and displays them as a textbox, which allows you to assign a price impact to it, and also not use the "save" button.

You can see more at http://www.presto-changeo.com/en/attribute-modules/34-attribute-wizard-pro.html

Link to comment
Share on other sites

Hey thanks a bunch for the explanation, I appreciate it.

Could you please elaborate a little more about custom coding it? For example, what language of coding, what file would the code go into, etc. Doing this seems like the most effective route, as I think getting a programmer to write a little code would be cheaper than buying the module for $125 that does a lot of other stuff I don't need.

Thanks again.

Link to comment
Share on other sites

Well, honestly, I think it would cost more to do the custom code.

Unless there's a simple way to determine if a product needs to have a limit or not, and if that limit is always the same.

Otherwise you need to create a backoffice interface to enter the limit specific to each product, and then enforce the limit in the front office.

Link to comment
Share on other sites

The module changes the way attributes are handled (to allow for more flexibility).

There is a demo for the backend, so you can read the instructions (int he configuration page) and create a test product to see how it works.

Link to comment
Share on other sites

also, another question if you don't mind.

As you can see in the attached image, there is a drop box for how many lines a customer can choose.

There is only one field for "wording on charm" next to the red arrow. This is great if a customer only wants one line, but can cause problems when people want 2 or 3 lines.

So when a customer selects 2 lines for example, would there be a way to automatically create 2 fields that say "wording on charm?" Then if they change the drop down back to 1 line, it will only show 1 box. If they rechoose 2 lines, another box will drop, etc.

Hopefully that makes sense :)

41948_vBHIezJDAP9t30qk0d9E_t

Link to comment
Share on other sites

also, another question if you don't mind.

As you can see in the attached image, there is a drop box for how many lines a customer can choose.

There is only one field for "wording on charm" next to the red arrow. This is great if a customer only wants one line, but can cause problems when people want 2 or 3 lines.

So when a customer selects 2 lines for example, would there be a way to automatically create 2 fields that say "wording on charm?" Then if they change the drop down back to 1 line, it will only show 1 box. If they rechoose 2 lines, another box will drop, etc.

Hopefully that makes sense :)


This feature will be added in one of the next releases of the module.
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...