- Posts: 332
- Thank you received: 6
Need Shipping Method on PayPal checkout page.
- LukeDouglas
-
Topic Author
- Offline
Less
More
11 years 3 weeks ago #213372
by LukeDouglas
Need Shipping Method on PayPal checkout page. was created by LukeDouglas
-- url of the page with the problem -- :
fearlessrider.com
-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.3
-- PHP version -- : 5.4.33
-- Browser(s) name and version -- : Multiple
-- Error-message(debug-mod must be tuned on) -- : No error message.
I read this post, hikashop.com/forum/payment-methods/87306...n-paypal.html#179914 , about the issue with a plain 'Shipping' listed on the PayPal checkout. I have a similar issue with a client that needs to know not only that the shipping is 'USPS' but if it is 'Priority Mail' or 'First Class Mail' so they can have the proper shipping label generated.
Can this be done and, if so, how?
-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.3
-- PHP version -- : 5.4.33
-- Browser(s) name and version -- : Multiple
-- Error-message(debug-mod must be tuned on) -- : No error message.
I read this post, hikashop.com/forum/payment-methods/87306...n-paypal.html#179914 , about the issue with a plain 'Shipping' listed on the PayPal checkout. I have a similar issue with a client that needs to know not only that the shipping is 'USPS' but if it is 'Priority Mail' or 'First Class Mail' so they can have the proper shipping label generated.
Can this be done and, if so, how?
Please Log in or Create an account to join the conversation.
11 years 3 weeks ago #213375
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 Need Shipping Method on PayPal checkout page.
Hi,
You can use the same kind of code than in the order display.
Where "shipping" and "shippingClass" are coming from
Regards,
You can use the same kind of code than in the order display.
Code:
echo JText::_('HIKASHOP_SHIPPING_METHOD') . ' : ';
if(is_string($this->order->order_shipping_method)) {
if(strpos($this->order->order_shipping_id, '-') !== false)
echo $this->shippingClass->getShippingName($this->order->order_shipping_method, $this->order->order_shipping_id);
else
echo $this->shipping->getName($this->order->order_shipping_method, $this->order->order_shipping_id);
} else
echo implode(', ', $this->order->order_shipping_method);
Where "shipping" and "shippingClass" are coming from
Code:
$pluginsShipping = hikashop_get('type.plugins');
$pluginsShipping->type='shipping';
$this->assignRef('shipping',$pluginsShipping);
$shippingClass = hikashop_get('class.shipping');
$this->assignRef('shippingClass', $shippingClass);
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.
- LukeDouglas
-
Topic Author
- Offline
Less
More
- Posts: 332
- Thank you received: 6
11 years 3 weeks ago #213402
by LukeDouglas
Replied by LukeDouglas on topic Need Shipping Method on PayPal checkout page.
Jerome,
I'm not a neophyte as I 'use' to be in application development back in the 70's - 90's, which is basically the dinosaur era, but if you could let me know the file name to be changed as well as a before and after view of the code you are instructing me to change, that would be terrific.
Thanks.
I'm not a neophyte as I 'use' to be in application development back in the 70's - 90's, which is basically the dinosaur era, but if you could let me know the file name to be changed as well as a before and after view of the code you are instructing me to change, that would be terrific.
Thanks.
Please Log in or Create an account to join the conversation.
11 years 3 weeks ago #213403
by nicolas
Replied by nicolas on topic Need Shipping Method on PayPal checkout page.
Hi,
The file to change is plugins/hikashoppayment/paypal/paypal.php
The change explained in that other thread ( hikashop.com/forum/payment-methods/87306...n-paypal.html#180163 ) will use the shipping method name instead of just "shipping".
For the service name, I guess you could change the line:
to:
in the code change of the other thread.
Please note that this is outside user support.
The file to change is plugins/hikashoppayment/paypal/paypal.php
The change explained in that other thread ( hikashop.com/forum/payment-methods/87306...n-paypal.html#180163 ) will use the shipping method name instead of just "shipping".
For the service name, I guess you could change the line:
Code:
$vars['item_name_' . $i] = $order->order_shipping_method;
Code:
$vars['item_name_' . $i] = $order->order_shipping_method.' '.$order->order_shipping_id;
Please note that this is outside user support.
Please Log in or Create an account to join the conversation.
Time to create page: 0.198 seconds