broderie Merchant از کشور France عضو از اکتبر 2023 broderie 14 اکتبر 2023 01:14 Hello everyone, I'm new to LiteCart, and I'm in the process of setting up a digital file sales website. I was wondering if it's possible to simplify the checkout page by removing the shipping information fields (like address, phone number, etc.) and only retain the email, first name, and last name fields. Since I'm selling digital products, I don't need the physical shipping details. Any guidance or suggestions on how to achieve this would be greatly appreciated! Thank you in advance for your help. Best regards, Youss
valdeo LiteCart Fan از کشور Bulgaria عضو از دسامبر 2017 valdeo 12 نوامبر 2023 17:42 Hello! After removing the address1 and address2 fields from /includes/templates/default.catalog/views/box_checkout_customer.inc.php, it ask me again to input address! How to solve this?
jackmaessen LiteCart Fan از کشور Netherlands عضو از دسامبر 2022 jackmaessen 12 نوامبر 2023 23:50 @valdeo Removing the input fields is not enough. You should also comment out the check on the fields in file [b]includes/entities/ent_order.inc.php[/b] Only address1 is required. About line 562 you will find the validation of the input fields: try { if (empty($this->data['customer']['firstname'])) throw new Exception(language::translate('error_missing_firstname', 'You must enter a first name.')); if (empty($this->data['customer']['lastname'])) throw new Exception(language::translate('error_missing_lastname', 'You must enter a last name.')); //if (empty($this->data['customer']['address1'])) throw new Exception(language::translate('error_missing_address1', 'You must enter an address.')); if (empty($this->data['customer']['city'])) throw new Exception(language::translate('error_missing_city', 'You must enter a city.')); if (empty($this->data['customer']['country_code'])) throw new Exception(language::translate('error_missing_country', 'You must select a country.'));``` But better not modify this file! Use the vmod below (attached) disable_address1.xml
valdeo LiteCart Fan از کشور Bulgaria عضو از دسامبر 2017 valdeo 13 نوامبر 2023 09:47 @ jackmaessen Many thanks for your valuable help!
valdeo LiteCart Fan از کشور Bulgaria عضو از دسامبر 2017 valdeo 17 نوامبر 2023 22:20 One more question if you don't mind. How to make the field for Different Shipping Address is always fully displayed?
jackmaessen LiteCart Fan از کشور Netherlands عضو از دسامبر 2022 jackmaessen 17 نوامبر 2023 22:59 See attachment (vmod) Checkbox removed and all fields of different shipping address default visible different_shipping_address_display.xml
valdeo LiteCart Fan از کشور Bulgaria عضو از دسامبر 2017 valdeo 18 نوامبر 2023 19:26 Works perfect! Thanks again!
valdeo LiteCart Fan از کشور Bulgaria عضو از دسامبر 2017 valdeo 19 نوامبر 2023 21:24 After removing the post code field, it throws message: you must enter the post code. But validation of this field in file includes/entities/ent_order.inc.php seems quite different from the others.I've tried to comment it out, but throws some error. Any help will be appreciated!
jackmaessen LiteCart Fan از کشور Netherlands عضو از دسامبر 2022 jackmaessen 19 نوامبر 2023 22:27 which postal code field did you remove: from Customer Details or Different Shipping Address? And what is exactly the error?
valdeo LiteCart Fan از کشور Bulgaria عضو از دسامبر 2017 valdeo 20 نوامبر 2023 10:00 Postal code field removed from Customer Details. After comment in includes/entities/ent_order.inc.php of: //if (reference::country($this->data['customer']['country_code'])->postcode_format) { if (!empty($this->data['customer']['postcode'])) { if (!preg_match('#'. reference::country($this->data['customer']['country_code'])->postcode_format .'#i', $this->data['customer']['postcode'])) { throw new Exception(language::translate('error_invalid_postcode_format', 'Invalid postcode format')); } } else { throw new Exception(language::translate('error_missing_postcode', 'You must enter a postcode')); } } Throws: Fatal error: syntax error, unexpected 'catch' (T_CATCH), expecting function (T_FUNCTION) or const (T_CONST) in ~/vmods/.cache/includes-entities-ent_order.inc.php (Line 610)
jackmaessen LiteCart Fan از کشور Netherlands عضو از دسامبر 2022 jackmaessen 20 نوامبر 2023 12:04 Haven't tested it but try this: if (!empty($this->data['customer']['postcode'])) { if (!preg_match('#'. reference::country($this->data['customer']['country_code'])->postcode_format .'#i', $this->data['customer']['postcode'])) { throw new Exception(language::translate('error_invalid_postcode_format', 'Invalid postcode format')); } } else { throw new Exception(language::translate('error_missing_postcode', 'You must enter a postcode')); } }*/``` or this: ```if (reference::country($this->data['customer']['country_code'])->postcode_format) { if (!empty($this->data['customer']['postcode'])) { if (!preg_match('#'. reference::country($this->data['customer']['country_code'])->postcode_format .'#i', $this->data['customer']['postcode'])) { //throw new Exception(language::translate('error_invalid_postcode_format', 'Invalid postcode format')); } } else { // throw new Exception(language::translate('error_missing_postcode', 'You must enter a postcode')); } }```
javierromerojr Project Leader از کشور Paraguay عضو از سپتامبر 2023 javierromerojr 20 نوامبر 2023 18:23 To deactivate the postal code you just have to go to country and then in code format and leave it empty and that's it.
valdeo LiteCart Fan از کشور Bulgaria عضو از دسامبر 2017 valdeo 21 نوامبر 2023 09:16 Thank you all! I will try your suggestions.
valdeo LiteCart Fan از کشور Bulgaria عضو از دسامبر 2017 valdeo 27 نوامبر 2023 23:07 Hello! The postal code warning is solved. Thanks! But after removing the country and zone fields in Different shipping address, I get this in order print and packing list: Warning: Invalid country code () in ~/includes/references/ref_country.inc.php (Line 12) Any help will be appreciated!
jackmaessen LiteCart Fan از کشور Netherlands عضو از دسامبر 2022 jackmaessen 28 نوامبر 2023 15:07 Comment it out: //trigger_error('Invalid country code ('. $country_code .')', E_USER_WARNING); }```
valdeo LiteCart Fan از کشور Bulgaria عضو از دسامبر 2017 valdeo 29 نوامبر 2023 09:03 @jackmaessen Thanks! I did it, but unfortunately this doesn't help!?