Anonymous | Login | Signup for a new account | 2024-09-07 18:37 CDT | ![]() |
Main | My View | View Issues | Change Log | Roadmap | Docs | Wiki | Repositories |
Viewing Issue Simple Details [ Jump to Notes ] [ Wiki ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||
ID | Category | Type | Reproducibility | Date Submitted | Last Update | ||
0001156 | [In-Portal CMS] Data Management | feature request | always | 2011-11-01 22:47 | 2012-07-25 05:32 | ||
Reporter | Dmitry | View Status | public | Project Name | In-Commerce | ||
Assigned To | alex | Developer | |||||
Priority | normal | Resolution | fixed | Fixed in Version | 5.2.0-B1 | ||
Status | closed | Product Version | Target Version | 5.2.0 | |||
Time Estimate | No estimate | ||||||
Summary | 0001156: Keeping Shopping Cart between Visits | ||||||
Description | If a visitor have a cart, wether a registered user or a visitor, we store order id in user's cookie (or maybe in user record in DB for logged in users), until cart is emptied (order completed or cart reset). | ||||||
Additional Information | |||||||
Tags | No tags attached. | ||||||
Reference | https://groups.google.com/d/topic/in-portal-dev/l4KtZDvX-pI/discussion | ||||||
Change Log Message | Added ability for keeping Shopping Cart content between Visits | ||||||
Estimate Points | 1 | ||||||
Attached Files |
![]() |
||||||
|
![]() |
||||||
|
![]() |
|
![]() alex (manager) 2011-11-02 03:47 |
With this version of OnRestoreOrder event order restore happens after user performs a login too (if he left his incomplete order last time). function OnRestoreOrder(&$event) { if ( $this->Application->isAdmin || $this->Application->RecallVar('ord_id') ) { // admin OR there is an active order -> don't restore from cookie return; } $cookies = $this->Application->HttpQuery->Cookie; $shop_cart_cookie = array_key_exists('shop_cart_cookie', $cookies) ? $cookies['shop_cart_cookie'] : false; if ( !$shop_cart_cookie ) { return; } $user_id = $this->Application->RecallVar('user_id'); $sql = 'SELECT OrderId FROM ' . TABLE_PREFIX . 'Orders WHERE (OrderId = ' . (int)$shop_cart_cookie . ') AND (Status = ' . ORDER_STATUS_INCOMPLETE . ') AND (PortalUserId = ' . $user_id . ')'; $order_id = $this->Conn->GetOne($sql); if ( $order_id ) { $this->Application->StoreVar('ord_id', $order_id); } } |
![]() Dmitry (manager) 2011-12-07 22:37 |
Tested on 5.1.3, please convert to 5.2.0 format and commit. |
![]() alex (manager) 2011-12-08 04:25 |
Fix committed to 5.2.x branch. Commit Message: Fixes 0001156: Keeping Shopping Cart between Visits |
![]() alex (manager) 2012-07-25 05:32 |
Since 5.2.0 version was released. |
![]() |
|||
Modules :: In-Commerce: 5.2.x r14846 Timestamp: 2011-12-08 04:25:33 Author: alex [ Details ] [ Diff ] |
Fixes 0001156: Keeping Shopping Cart between Visits | ||
mod - /w/in-commerce/branches/5.2.x/units/orders/orders_config.php | [ Diff ] [ File ] | ||
mod - /w/in-commerce/branches/5.2.x/units/orders/orders_event_handler.php | [ Diff ] [ File ] | ||
![]() |
|||
Date Modified | Username | Field | Change |
2012-07-25 05:32 | alex | Note Added: 0005030 | |
2012-07-25 05:32 | alex | Status | resolved => closed |
2011-12-08 04:25 | alex | Note Added: 0004229 | |
2011-12-08 04:25 | alex | Status | reviewed and tested => resolved |
2011-12-08 04:25 | alex | Fixed in Version | => 5.2.0-B1 |
2011-12-08 04:25 | alex | Resolution | open => fixed |
2011-12-08 04:25 | alex | Changeset attached | 5.2.x r14846 |
2011-12-07 22:37 | Dmitry | Note Added: 0004224 | |
2011-12-07 22:37 | Dmitry | Assigned To | Dmitry => alex |
2011-12-07 22:37 | Dmitry | Status | needs testing => reviewed and tested |
2011-12-07 22:37 | Dmitry | Target Version | Icebox => 5.2.0 |
2011-11-02 03:48 | alex | Assigned To | => Dmitry |
2011-11-02 03:48 | alex | Developer | => alex |
2011-11-02 03:48 | alex | Status | active => needs testing |
2011-11-02 03:47 | alex | Note Added: 0004117 | |
2011-11-02 03:43 | alex | Relationship added | related to 0000029 |
2011-11-01 22:47 | Dmitry | New Issue | |
2011-11-01 22:47 | Dmitry | File Added: remember_shop_cart_between_visits_feature.patch | |
2011-11-01 22:47 | Dmitry | Reference | => https://groups.google.com/d/topic/in-portal-dev/l4KtZDvX-pI/discussion |
2011-11-01 22:47 | Dmitry | Change Log Message | => Added ability for keeping Shopping Cart content between Visits |
2011-11-01 22:47 | Dmitry | Estimate Points | => 1 |
Main | My View | View Issues | Change Log | Roadmap | Docs | Wiki | Repositories |
Web Development by Intechnic![]() In-Portal Open Source CMS |