Post by NoJoke » Mon Aug 22, 2016 7:20 am

Hello,

I am using OC version 1.5.4.

I am trying to figure out how to get the product information to the shipping method files located in the model/shipping folder.

I basically need to have the same info that is available in the controller/checkout/cart.php file to be available for use in those files as well.

Any help is greatly appreciated.

Thanks

Active Member

Posts

Joined
Fri Oct 14, 2011 5:37 am

Post by Johnathan » Mon Aug 22, 2016 10:17 pm

Use this function get the cart product data into an array:

$this->cart->getProducts()

If that isn't enough information for each product, you can then use the /catalog/model/catalog/product.php file to get more info, or a direct database query to get the rest of the info in the "product" table.

Image
Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by NoJoke » Tue Aug 23, 2016 5:55 am

Thanks Jonathan,

Exactly what I needed,

It was one of those things where when you stare at it too long all hope gets lost.

Thanks again for your help!

Active Member

Posts

Joined
Fri Oct 14, 2011 5:37 am

Post by NoJoke » Tue Aug 23, 2016 7:36 am

Do you possibly know what controls the fedex module from displaying? I am needing it to display even if the weight is 0 as I am manually setting the price when certain requirements are met.

Thanks

Active Member

Posts

Joined
Fri Oct 14, 2011 5:37 am

Post by NoJoke » Tue Aug 23, 2016 8:23 am

nvm i was able to spoof what I needed by setting the cost to zero and then coding in the exceptions.

Active Member

Posts

Joined
Fri Oct 14, 2011 5:37 am
Who is online

Users browsing this forum: No registered users and 4 guests