[Skip to main content](#vessel-content)

#   Shipping Same Address Checkbox having issues

##

- **[magicwords](/forum/user/33185-magicwords "View magicwords's Profile")**
- [![magicwords's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/redswirl.jpg)](/forum/user/33185-magicwords "View magicwords's Profile") Topic Author
- [ Offline](/forum/user/33185-magicwords)

Less More

- Posts: 66
- Thank you received: 0
-
-
-
- [](http://www.magicwebconsultants.com)
-

11 years 10 months ago [\#182475](#182475) by [magicwords](/forum/user/33185-magicwords "View magicwords's Profile")  *[Shipping Same Address Checkbox having issues](/forum/27-checkout/873497-shipping-same-address-checkbox-having-issues#182475 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6  Hello,  I tried including the checkbox. But when I check 'Use the same address as for billing&quot;, 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")* was created by *[magicwords](/forum/user/33185-magicwords "View magicwords's Profile")*

-- HikaShop version -- : 2.3.5
-- 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.
[ ![checkout&#95;address.png](/forum/attachment/21109) ](/forum/attachment/21109 "...ut&#95;address.png")

Requesting you to Kindly look into this asap

Thank You,

Gaurav

- [ ![checkout&#95;address.png](/forum/attachment/21109) ](/forum/attachment/21109 "...ut&#95;address.png") [ ](/forum/attachment/21109?download=1 "...ut&#95;address.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg3MzQ5Ny1zaGlwcGluZy1zYW1lLWFkZHJlc3MtY2hlY2tib3gtaGF2aW5nLWlzc3Vlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

11 years 10 months ago [\#182527](#182527) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Shipping Same Address Checkbox having issues](/forum/27-checkout/873497-shipping-same-address-checkbox-having-issues#182527 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6  Hello,  I tried including the checkbox. But when I check 'Use the same address as for billing&quot;, 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")*

Hi,

Here is the fix:
[ www.hikashop.com/forum/checkout/872741-n...art-page.html#182454](http://www.hikashop.com/forum/checkout/872741-no-button-to-move-past-first-cart-page.html#182454)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg3MzQ5Ny1zaGlwcGluZy1zYW1lLWFkZHJlc3MtY2hlY2tib3gtaGF2aW5nLWlzc3Vlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[magicwords](/forum/user/33185-magicwords "View magicwords's Profile")**
- [![magicwords's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/redswirl.jpg)](/forum/user/33185-magicwords "View magicwords's Profile") Topic Author
- [ Offline](/forum/user/33185-magicwords)

Less More

- Posts: 66
- Thank you received: 0
-
-
-
- [](http://www.magicwebconsultants.com)
-

11 years 10 months ago [\#184037](#184037) by [magicwords](/forum/user/33185-magicwords "View magicwords's Profile")  Replied by *[magicwords](/forum/user/33185-magicwords "View magicwords's Profile")* on topic *[Shipping Same Address Checkbox having issues](/forum/27-checkout/873497-shipping-same-address-checkbox-having-issues#184037 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6  Hello,  I tried including the checkbox. But when I check 'Use the same address as for billing&quot;, 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")*

Hi according to your given suggestion I tried to follow the instructions given in your link, that is:

> Change the code:
> $currentTask = 'shipping\_address';
> if( (empty($task) \|\| $task == $currentTask) &amp;&amp; !empty($data\[$currentTask\])) {
>
> to:
> $same\_address = JRequest::getString('same\_address');
> $currentTask = 'shipping\_address';
> if( (empty($task) \|\| $task == $currentTask) &amp;&amp; !empty($data\[$currentTask\]) &amp;&amp; $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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg3MzQ5Ny1zaGlwcGluZy1zYW1lLWFkZHJlc3MtY2hlY2tib3gtaGF2aW5nLWlzc3Vlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

11 years 10 months ago [\#184056](#184056) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Shipping Same Address Checkbox having issues](/forum/27-checkout/873497-shipping-same-address-checkbox-having-issues#184056 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6  Hello,  I tried including the checkbox. But when I check 'Use the same address as for billing&quot;, 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")*

Hi,

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg3MzQ5Ny1zaGlwcGluZy1zYW1lLWFkZHJlc3MtY2hlY2tib3gtaGF2aW5nLWlzc3Vlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[magicwords](/forum/user/33185-magicwords "View magicwords's Profile")**
- [![magicwords's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/redswirl.jpg)](/forum/user/33185-magicwords "View magicwords's Profile") Topic Author
- [ Offline](/forum/user/33185-magicwords)

Less More

- Posts: 66
- Thank you received: 0
-
-
-
- [](http://www.magicwebconsultants.com)
-

11 years 10 months ago [\#184102](#184102) by [magicwords](/forum/user/33185-magicwords "View magicwords's Profile")  Replied by *[magicwords](/forum/user/33185-magicwords "View magicwords's Profile")* on topic *[Shipping Same Address Checkbox having issues](/forum/27-checkout/873497-shipping-same-address-checkbox-having-issues#184102 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6  Hello,  I tried including the checkbox. But when I check 'Use the same address as for billing&quot;, 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")*

> Change the code:
> $currentTask = 'shipping\_address';
> if( (empty($task) \|\| $task == $currentTask) &amp;&amp; !empty($data\[$currentTask\])) {
>
> to:
> $same\_address = JRequest::getString('same\_address');
> $currentTask = 'shipping\_address';
> if( (empty($task) \|\| $task == $currentTask) &amp;&amp; !empty($data\[$currentTask\]) &amp;&amp; $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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg3MzQ5Ny1zaGlwcGluZy1zYW1lLWFkZHJlc3MtY2hlY2tib3gtaGF2aW5nLWlzc3Vlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

11 years 10 months ago [\#184130](#184130) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Shipping Same Address Checkbox having issues](/forum/27-checkout/873497-shipping-same-address-checkbox-having-issues#184130 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6  Hello,  I tried including the checkbox. But when I check 'Use the same address as for billing&quot;, 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 zip the file /home/pponline3/public_html/administrator/components/com_hikashop/classes/address.php and provide the zip so that we can see what you did.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg3MzQ5Ny1zaGlwcGluZy1zYW1lLWFkZHJlc3MtY2hlY2tib3gtaGF2aW5nLWlzc3Vlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[magicwords](/forum/user/33185-magicwords "View magicwords's Profile")**
- [![magicwords's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/redswirl.jpg)](/forum/user/33185-magicwords "View magicwords's Profile") Topic Author
- [ Offline](/forum/user/33185-magicwords)

Less More

- Posts: 66
- Thank you received: 0
-
-
-
- [](http://www.magicwebconsultants.com)
-

11 years 10 months ago [\#184221](#184221) by [magicwords](/forum/user/33185-magicwords "View magicwords's Profile")  Replied by *[magicwords](/forum/user/33185-magicwords "View magicwords's Profile")* on topic *[Shipping Same Address Checkbox having issues](/forum/27-checkout/873497-shipping-same-address-checkbox-having-issues#184221 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6  Hello,  I tried including the checkbox. But when I check 'Use the same address as for billing&quot;, 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")*

I have zipped the two address.php files one, which is the original from hikashop and the other one which is modified according to the instructions given here. That is according:

> Change the code:
> $currentTask = 'shipping\_address';
> if( (empty($task) \|\| $task == $currentTask) &amp;&amp; !empty($data\[$currentTask\])) {
>
> to:
> $same\_address = JRequest::getString('same\_address');
> $currentTask = 'shipping\_address';
> if( (empty($task) \|\| $task == $currentTask) &amp;&amp; !empty($data\[$currentTask\]) &amp;&amp; $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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg3MzQ5Ny1zaGlwcGluZy1zYW1lLWFkZHJlc3MtY2hlY2tib3gtaGF2aW5nLWlzc3Vlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

11 years 10 months ago [\#184229](#184229) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Shipping Same Address Checkbox having issues](/forum/27-checkout/873497-shipping-same-address-checkbox-having-issues#184229 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6  Hello,  I tried including the checkbox. But when I check 'Use the same address as for billing&quot;, 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")*

Hi,

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
*This attachment is hidden for guests.
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](http://en.wikipedia.org/wiki/Newline)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg3MzQ5Ny1zaGlwcGluZy1zYW1lLWFkZHJlc3MtY2hlY2tib3gtaGF2aW5nLWlzc3Vlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.279 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
