- Posts: 101
- Thank you received: 12
[solved] Shipping address not shown. Custom field.
11 years 10 months ago - 11 years 10 months ago #178671
by SG
[solved] Shipping address not shown. Custom field. was created by SG
-- HikaShop version -- : 2.3.4
-- Joomla version -- : 2.5.27
Hi,
I have hikashop 2.3.4 now. Before the update I had 2.1.3.
In 2.1.3 the following was working:
I didn’t use the shipping method from Hikashop and used the custom fields instead. You will see why.
I made a custom field of the type order and called it shipmeth. And this was a radio-button with three options: Normal, Urgent and Self Pickup.
I also made a custom field of the type order and called it Pickup Date. I used ‘Display limited to” and chose Self Pickup from shipmeth field.
The main reason was to be able to show the pickup date when self pickup was chosen.
The problem I had back in 2.1.3 was that I couldn’t see the shipping address since I didn't use the shipping methods.
I solved this by commenting out the following line in checkout/address:
And at bottom:
}else{
}
This was working and it allowed me to choose a shipping address and it showed it in the order email.
But with the upgrade to 2.3.4 there were a couple of things not working because of the new tag system.
I just put the following code in order_creation_notification.html.modified.php:
echo '{TXT:BILLING_ADDRESS}<br/>{VAR:BILLING_ADDRESS}<br/><br/><br/>{TXT:SHIPPING_ADDRESS}<br/{VAR:SHIPPING_ADDRESS}</td></tr>';
The following code is hiding the shipping address so I copied the code above separately:
<!--{IF:SHIPPING}--><!--{IF:SHIPPING_ADDRESS}—>
But after checking out you can see in the order mail that the shipping address is the same as the billing address.
And the shipping address is not the one that I chose during checkout.
(see picture below to see what I mean)
I suspect it’s because of the following code found in the preload text:
i
What should be changed so that the shipping address that was chosen during the checkout is assigned to $vars.
Here is an example of the a checkout and I put the part of the mail below with the shadow and as you can see the shipping address that I chose is not shown in the mail.
Thanks in advance.
-- Joomla version -- : 2.5.27
Hi,
I have hikashop 2.3.4 now. Before the update I had 2.1.3.
In 2.1.3 the following was working:
I didn’t use the shipping method from Hikashop and used the custom fields instead. You will see why.
I made a custom field of the type order and called it shipmeth. And this was a radio-button with three options: Normal, Urgent and Self Pickup.
I also made a custom field of the type order and called it Pickup Date. I used ‘Display limited to” and chose Self Pickup from shipmeth field.
The main reason was to be able to show the pickup date when self pickup was chosen.
The problem I had back in 2.1.3 was that I couldn’t see the shipping address since I didn't use the shipping methods.
I solved this by commenting out the following line in checkout/address:
Code:
if($this->has_shipping) {
And at bottom:
}else{
}
This was working and it allowed me to choose a shipping address and it showed it in the order email.
But with the upgrade to 2.3.4 there were a couple of things not working because of the new tag system.
I just put the following code in order_creation_notification.html.modified.php:
echo '{TXT:BILLING_ADDRESS}<br/>{VAR:BILLING_ADDRESS}<br/><br/><br/>{TXT:SHIPPING_ADDRESS}<br/{VAR:SHIPPING_ADDRESS}</td></tr>';
The following code is hiding the shipping address so I copied the code above separately:
<!--{IF:SHIPPING}--><!--{IF:SHIPPING_ADDRESS}—>
But after checking out you can see in the order mail that the shipping address is the same as the billing address.
And the shipping address is not the one that I chose during checkout.
(see picture below to see what I mean)
I suspect it’s because of the following code found in the preload text:
i
Code:
f(!empty($data->cart->override_shipping_address)) {
$vars['SHIPPING_ADDRESS'] = $data->cart->override_shipping_address;
} elseif(!empty($data->order_shipping_id) && !empty($data->cart->shipping_address) && !empty($data->cart->fields)) {
$vars['SHIPPING_ADDRESS'] = $addressClass->displayAddress($data->cart->fields,$data->cart->shipping_address,$view);
} else {
$vars['SHIPPING_ADDRESS'] = $vars['BILLING_ADDRESS'];
}
What should be changed so that the shipping address that was chosen during the checkout is assigned to $vars.
Here is an example of the a checkout and I put the part of the mail below with the shadow and as you can see the shipping address that I chose is not shown in the mail.
Thanks in advance.
Last edit: 11 years 10 months ago by SG. Reason: changed subject to solved
Please Log in or Create an account to join the conversation.
11 years 10 months ago #178694
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Replied by Jerome on topic Shipping address not shown. Custom field used.
Hi,
You can change
To
so it will use the shipping address even if you don't have a shipping method.
Regards,
You can change
Code:
} elseif(!empty($data->order_shipping_id) && !empty($data->cart->shipping_address) && !empty($data->cart->fields)) {
Code:
} elseif(!empty($data->cart->shipping_address) && !empty($data->cart->fields)) {
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: SG
Please Log in or Create an account to join the conversation.
11 years 10 months ago #178798
by SG
Replied by SG on topic Shipping address not shown. Custom field used.
Merci Jerome, it's working again!
Do you think it's difficult to make a hikashop shipping plugin with the principle of what I'm trying to do.
I mean having a Normal, Urgent and Self Pickup choice and only when Self Pickup is chosen, a datepicker will appear?
Greets
Do you think it's difficult to make a hikashop shipping plugin with the principle of what I'm trying to do.
I mean having a Normal, Urgent and Self Pickup choice and only when Self Pickup is chosen, a datepicker will appear?
Greets
Please Log in or Create an account to join the conversation.
11 years 10 months ago #178802
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Replied by Jerome on topic Shipping address not shown. Custom field used.
Hi,
It depends if you want to embed all in the plugin or not ("not" means : using order custom fields).
We are currently finishing a plugin "envoi moins cher" which is a French shipping platform. The plugin will include a pickup point selection and other stuff like that.
Today with the panel of triggers that HikaShop have ; it is possible to do a lot of things inside a plugin.
Some things are not difficult to do but it requires to have the knowledge of it existence.
Regards,
It depends if you want to embed all in the plugin or not ("not" means : using order custom fields).
We are currently finishing a plugin "envoi moins cher" which is a French shipping platform. The plugin will include a pickup point selection and other stuff like that.
Today with the panel of triggers that HikaShop have ; it is possible to do a lot of things inside a plugin.
Some things are not difficult to do but it requires to have the knowledge of it existence.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
11 years 10 months ago #179352
by SG
Replied by SG on topic Shipping address not shown. Custom field used.
Thanks Jerome.
When is the plugin coming out? In a couple of weeks, months?
Will Hikashop send a mail about the new plugin?
Just so I wont miss the launch of the plugin
I will have to take a deeper look into the triggers too.
Cheers
When is the plugin coming out? In a couple of weeks, months?
Will Hikashop send a mail about the new plugin?
Just so I wont miss the launch of the plugin
I will have to take a deeper look into the triggers too.
Cheers
Please Log in or Create an account to join the conversation.
11 years 10 months ago #179525
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Replied by Jerome on topic Shipping address not shown. Custom field used.
Hi,
"envoi moins cher" is planned for the next HikaShop release (2.3.5).
I think we will publish it during december (but I can't be more precise, I don't know more).
Regards,
"envoi moins cher" is planned for the next HikaShop release (2.3.5).
I think we will publish it during december (but I can't be more precise, I don't know more).
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: SG
Please Log in or Create an account to join the conversation.
11 years 10 months ago #179587
by SG
Replied by SG on topic Shipping address not shown. Custom field used.
Thanks for the info. I know enough for now 
I will mark this as solved.
I will mark this as solved.
Please Log in or Create an account to join the conversation.
Time to create page: 0.237 seconds