Shipping Same Address Checkbox having issues
- magicwords
-
Topic Author
- Offline
-- Joomla version -- : 3.3.6
Hello,
I tried including the checkbox. But when I check 'Use the same address as for billing", then I get the errors even the Billing Address fields are filled up properly. Please see the attached screenshot for the error.
Requesting you to Kindly look into this asap
Thank You,
Gaurav
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- magicwords
-
Topic Author
- Offline
Change the code:
$currentTask = 'shipping_address';
if( (empty($task) || $task == $currentTask) && !empty($data[$currentTask])) {
to:
$same_address = JRequest::getString('same_address');
$currentTask = 'shipping_address';
if( (empty($task) || $task == $currentTask) && !empty($data[$currentTask]) && $same_address != 'yes') {
in the file administrator/components/com_hikashop/classes/address.php and that should fix the problem.
But after doing this, the page becomes completely blank, nothing comes up. When I restore the original file without the above suggested modification, it works normally as it would. But the problem of the error despite of selecting the checkbox remains same.
PLEASE GUIDE!!!
Please Log in or Create an account to join the conversation.
It means that there is a bug if you have a blank page.
Please try again and do a screenshot of your code modification and turn on the "error reporting" and "debug mode" options of the Joomla configuration and if you get the blank page, it will display an error message that you can give us so that we can tell you what's wrong.
Please Log in or Create an account to join the conversation.
- magicwords
-
Topic Author
- Offline
Change the code:
$currentTask = 'shipping_address';
if( (empty($task) || $task == $currentTask) && !empty($data[$currentTask])) {
to:
$same_address = JRequest::getString('same_address');
$currentTask = 'shipping_address';
if( (empty($task) || $task == $currentTask) && !empty($data[$currentTask]) && $same_address != 'yes') {
in the file administrator/components/com_hikashop/classes/address.php and that should fix the problem.
According to your instructions, I made the changes to the address.php and enabled the error reporting in joomla configuration to check why it is not working. Here is the error I got.
Parse error: syntax error, unexpected 'defined' (T_STRING) in /home/pponline3/public_html/administrator/components/com_hikashop/classes/address.php on line 1
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- magicwords
-
Topic Author
- Offline
Change the code:
$currentTask = 'shipping_address';
if( (empty($task) || $task == $currentTask) && !empty($data[$currentTask])) {
to:
$same_address = JRequest::getString('same_address');
$currentTask = 'shipping_address';
if( (empty($task) || $task == $currentTask) && !empty($data[$currentTask]) && $same_address != 'yes') {
in the file administrator/components/com_hikashop/classes/address.php and that should fix the problem.
Please find attached zip file.
Please Log in or Create an account to join the conversation.
The issue is that when you edited the file, your text editor replaced all the \r\n (compatible with all the OSes) in the file with only \r (on a mac I suppose) and that your server only sees the \n (a linux based server).
Because of that, your server thinks that all the code of the file is on one line and crashes when processing it.
Here is a zip with your modified file where I converted back the \r to \r\n
Please log in or register to see it.
Here is more information about \r and \n and issues with them:
en.wikipedia.org/wiki/Newline
Please Log in or Create an account to join the conversation.