rhythm Posted September 27, 2019 Share Posted September 27, 2019 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 More sharing options...
rhythm Posted September 30, 2019 Author Share Posted September 30, 2019 Up Link to comment Share on other sites More sharing options...
EvaF Posted September 30, 2019 Share Posted September 30, 2019 try: new Cart( (int) $_GET['id']) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now