Shipping module - no pick-up points address

  • Posts: 33
  • Thank you received: 2
8 years 11 months ago #224035

-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4

Hello everyone,

I have troubles trying to integrate the shipping module ( points.boxberry.ru/demo/ ):
I made a custom field for address of pick-up point, choosen by the customer. But after check-out i dont see this address, the address doesn't saved / displayed at all.

Please help. Thanx!

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
8 years 11 months ago #224064

Hi,

If you look in your database in the hikashop_address table, doing you get the value filled in the custom field ?
If so, then it's just that you need to add the tag of the field in the "address_template" file of your frontend and backend template via the menu Display>Views.
If not, then there is a problem with your integration. We would need to know what you did in your integration in order to be able to say anything useful.

Please Log in or Create an account to join the conversation.

  • Posts: 33
  • Thank you received: 2
8 years 11 months ago #224120

Hi,

the problem is that the 'override' function doesn't work properly. I have an option to choose shipping way, where shipping address differs from the customer's address. This new shipping address should be choosen in i-frame, out of given pick-up points. And at this moment Override has to work, saving a new shipping address. But actually Override is working already when i choose a shipping way, saving nothing (because new shipping address is not choosen yet) As a result - NO shipping address at all on server.

here is the script:
<div id="hikashop_checkout_address_right_part" class="hikashop_checkout_address_right_part<?php if(HIKASHOP_RESPONSIVE){ echo ' '.HK_GRID_COL_6;} ?>">
<fieldset class="hika_address_field" id="hikashop_checkout_shipping_address">
<legend><?php echo JText::_('HIKASHOP_SHIPPING_ADDRESS'); ?></legend>
<?php
$checked = '';
$style = '';

$override = false;
foreach($this->currentShipping as $selectedMethod){
if(!empty($selectedMethod) && method_exists($selectedMethod, 'getShippingAddress')) {
$override = $selectedMethod->getShippingAddress();
}
}

if(!empty($override)) {
?> <span class="hikashop_checkout_shipping_address_info">
<div>
<a href="#" onclick="boxberry.open(callback_function); return false;">Выбрать пункт выдачи заказа на карте</a>
<p id="js-pricedelivery" type="text" readonly="" value="" style="display: none;"></p>

</div>
<?php

echo $override;?>




</span>

Thanx

Last edit: 8 years 11 months ago by xtrmutor.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
8 years 11 months ago #224136

Hi,

The problem is not with the shipping address override system but with the way you implemented your code.
What I would recommend to do is something completely different. It is to base yourself on the envoimoinscher shipping plugin:
www.hikashop.com/support/support/documen...imoinscher-form.html
This shipping plugin offers a wide range of shipping methods (UPS, USPS, etc, but also pickup points). It displays all the activated shipping methods on the checkout and if it's a shipping method with a pickup point selection that is selected by the customer, the plugin will display an extra view on the checkout for the customer to be able to select his pickup point.
After that, the pickup point will be added to the order information and be displayed on the order details page, the invoice and the notification emails.
That's how I would recommend to do that in your case too.

Please Log in or Create an account to join the conversation.

  • Posts: 33
  • Thank you received: 2
8 years 11 months ago #224331

Hi,

and without envoimoinscher shipping plugin, what is the way to make it work? With what i have now.
Thanx

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
8 years 11 months ago #224334

Hi,

I'm not saying that you should use that plugin, but that you should add your pickup system through a plugin, as it is done in the envoimoinscher plugin.
The shipping address override system isn't made to let the customer select stuff, so you don't have any place to save the data of the pick up point selected. Sure you can hack the system to add that... but I wouldn't recommend that.
If nevertheless you want to go down that road, you'll have to edit the file components/com_hikashop/controllers/checkout.php and add custom code in the after_address function to store your pickup point selection. For example, you could have it stored in a custom order field.

Please Log in or Create an account to join the conversation.

  • Posts: 33
  • Thank you received: 2
8 years 11 months ago #224990

Hi Nicolas,

what kann you say, about my solution for boxberry pick-up points?
solution
Sorry for my "french" :)

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
8 years 11 months ago #225035

Hi,

If it works for you, then it's great ! There are many ways to do things and yours looks fine too. I see that you added your code in view overrides, which is great since then you won't loose your changes when you update.

Please Log in or Create an account to join the conversation.

Time to create page: 0.079 seconds
Powered by Kunena Forum