Jump to content

How to get Cart object into another PHP file


rhythm

Recommended Posts

Hello,

What I am trying to do:

I have this file: https://myshop/FILE.php. I am doing WebService stuff on that file with WebService Library.

Let's say I send Cart ID to FILE.php. I want to retrieve cart object so I can use it's methods like to calculate shipping for it and all in my FILE.php. So how do I retrieve cart object if I have it's ID?

I tried doing  $cart = $this->context->cart = new Cart($_GET['id']); but I honestly do not understand that context thing, it failed

Also tried require_once('./classes/Cart.php'). File was imported, but Cart class not found

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...