sackling Posted July 11, 2019 Share Posted July 11, 2019 When looking at orders>shopping cart There is a column for online with the option Yes/No It seems to always show NO. I would have thought it meant if the cart is "active" or moving around it would be considered online but that does not seem to be the case. Link to comment Share on other sites More sharing options...
selectshop.at Posted July 12, 2019 Share Posted July 12, 2019 Online is the feaature you set for your product. You can set that this product is only available "online" and not in your non-virtual store. Take a look into the settings possibilities directly in the product page, if you set some product by wrong. Link to comment Share on other sites More sharing options...
sackling Posted July 12, 2019 Author Share Posted July 12, 2019 Thanks for the reply. This is just a test shop so I am really just getting a feel for the BO. Is there a way to see just "active" shopping carts. I.e. carts that have had activity/movement in the last 5 minutes for example? Link to comment Share on other sites More sharing options...
Kert L Posted July 12, 2019 Share Posted July 12, 2019 The "Online" Field does just that, but its functionality is weird. Taken from AdminCartsController.php if (Configuration::get('PS_GUEST_CHECKOUT_ENABLED')) { $this->fields_list['id_guest'] = array( 'title' => $this->trans('Online', array(), 'Admin.Global'), 'align' => 'text-center', 'type' => 'bool', 'havingFilter' => true, 'class' => 'fixed-width-xs', ); } It seems like this "Online" field only exists if you have Guest Checkout Enabled. The query to see if the cart is "Online" is as follows: LEFT JOIN ( SELECT `id_guest` FROM `' . _DB_PREFIX_ . 'connections` WHERE TIME_TO_SEC(TIMEDIFF(\'' . pSQL(date('Y-m-d H:i:00', time())) . '\', `date_add`)) < 1800 LIMIT 1 ) AS co ON co.`id_guest` = a.`id_guest`' So if connections table guest date_add is less than 30 minutes then it is "Online" Testing this does not output the same results as this. Very confusing Link to comment Share on other sites More sharing options...
sackling Posted July 12, 2019 Author Share Posted July 12, 2019 Thanks for digging in. The code looks to do exactly like I want. I think guest checkout is enabled by default. And testing in admin seems to show every single cart "online" even the carts that were already listed from the original install. sooo something seems to be up with that. Link to comment Share on other sites More sharing options...
selectshop.at Posted July 12, 2019 Share Posted July 12, 2019 Active carts, so carts bought and the one not bought you can see on back-office on the tab "customers" -> shopping carts. Guest checkout is enabled by default. 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