Checkout Form

Hello all ,,,

i added a new field to be filled by my customers at checkout page ,,, and in order to approve their payment and change the order status to paid i need to check the input of that field per each order ,,

after i added it i placed an order to check my orders table and i couldn't find the data of the field

that means i need to add a corresponding column to hold the data !!!

i need your help so that i can go through safe and efficient steps to do so ...

thanks in advance

I think, you can find the data in the cscart_profile_fields_data with the object_id = Order ID and object_type = O

I think, you can find the data in the cscart_profile_fields_data with the object_id = Order ID and object_type = O

i couldn't find !!!

i added it as html blcok then i added the html code below

(

Enter Trx ID : 

)

i couldn't find !!!

i added it as html blcok then i added the html code below

(

Enter Trx ID : 

)

Simply adding HTML code will not store the passed data in the database of your store.

Could you please let me know, why the default feature of adding new customer's profile fields, does not suit you, so I can try to offer you the best solution?

You can add new profile fields for checkout with default functionality

https://docs.cs-cart.com/latest/user_guide/users/customers/change_profile_fields.html

Also the field should be added to the corresponding block on the Checkout layout page

Simply adding HTML code will not store the passed data in the database of your store.

Could you please let me know, why the default feature of adding new customer's profile fields, does not suit you, so I can try to offer you the best solution?

hello ,,,

i solve it by adding a new profile field to store the data i need

,,, at first i thought every block i add will automatically be added as form field and will be submitted to order data table ,,,

thank you so much

You can add new profile fields for checkout with default functionality

https://docs.cs-cart.com/latest/user_guide/users/customers/change_profile_fields.html

Also the field should be added to the corresponding block on the Checkout layout page

i did it ,,,,, problem solved :)

thank you so much

Simply adding HTML code will not store the passed data in the database of your store.

Could you please let me know, why the default feature of adding new customer's profile fields, does not suit you, so I can try to offer you the best solution?

how can i add some validation to specific field like input must be numbers and for example only 20 digits are allowed not less or more

For example, you can use the "User-defined CSS class" property and cm-regexp microformat

https://docs.cs-cart.com/latest/developer_guide/core/front-end/microformats.html

For example, you can use the "User-defined CSS class" property and cm-regexp microformat

https://docs.cs-cart.com/latest/developer_guide/core/front-end/microformats.html

i found pretty good validation classes but i could not find predefined class for number or length of input should i add a new cm class???

i found pretty good validation classes but i could not find predefined class for number or length of input should i add a new cm class???

where should i add this?? to my input field

i found pretty good validation classes but i could not find predefined class for number or length of input should i add a new cm class???

Please check how the cm-regexp microformat works. You can use any regular expression with any conditions according to your needs

Please check how the cm-regexp microformat works. You can use any regular expression with any conditions according to your needs

how ?? i just need customer to enter only 11 digits !!!

If you are not familiar with regular expressions, hire someone to create a rule for 11 digits. Small code changes are required

how ?? i just need customer to enter only 11 digits !!!

Regular expression for 11 digits will look like this:

^\d{11}$

You can test it here:

https://regex101.com/r/iUFhp7/1

Regular expression for 11 digits will look like this:

^\d{11}$

You can test it here:

https://regex101.com/r/iUFhp7/1

thank you ,,,,

Regular expression for 11 digits will look like this:

^\d{11}$

You can test it here:

https://regex101.com/r/iUFhp7/1


where should i add this i could not find cm class @ my jJS files !

also

 is this correct ??

am sorry my platform is already live ,, so i need to solve this issue badly

thank for penitence

The for property on label and id property on input should match

Script can be added to

design/themes/responsive/templates/addons/my_changes/hooks/index/scripts.post.tpl

The My change module should be enabled. For profile fields you can use built-in tools to add extra class


where should i add this i could not find cm class @ my jJS files !

also

 is this correct ??

am sorry my platform is already live ,, so i need to solve this issue badly

thank for penitence

In case you are adding the new input via your own code, as eComLabs has correctly stated, for and id should match. Also in the script, you need to replace the text elm_id with actual element ID, in your case it has to be xx.

In case you will add the new profile field using built-in tools, you may need to make additional changes in the design/themes/responsive/templates/views/profiles/components/profile_fields.tpl template. To be more specific, you can use the hook profiles:profile_fieldsprofiles:profile_fields to override it where you need to make changes to the default code where label element is defined:

    {$field.description}

In a way, that the cm-regexp class will be added to the profile field, which requires validation.

The for property on label and id property on input should match

Script can be added to

design/themes/responsive/templates/addons/my_changes/hooks/index/scripts.post.tpl

The My change module should be enabled. For profile fields you can use built-in tools to add extra class

how can i enable My change module ??

thanks in advance