Commit Graph

109 Commits

Author SHA1 Message Date
Ankush Menat
9c7df2eec5 fix: ignore duplicates explicitly 2022-02-23 14:27:45 +05:30
marination
29c576e144 chore: Remove commented out code 2022-02-16 12:41:39 +05:30
marination
4f5a0b8941 chore: Fix flaky test test_exact_match_with_price
- Clear cart settings in cache to avoid stale values
2022-02-08 12:02:02 +05:30
marination
a64228741d fix: Trim spaces from attributes (multi-variant creation) & explicit method for building cache
- Multiple Item Variants creation fails due to extra spaces in attributes from popup. Clean them before passing to server side
- Mention explicit method to build variants cache to avoid ambiguity between old method path (pre-refactor)
2022-02-08 11:15:19 +05:30
marination
26bd3053d1 perf: Weed out disabled variants via sql query instead of pythonic looping separately
- If the number of variants are large (almost 2lakhs), the query to get variants and attribute data takes time
- If the no.of disabled attributes is large as well, the list comprehension weeding out disabled variants takes forever
- We dont need to loop over the variants data so many times
- Avoid any `if a in list(b)` is best when the iterables have tremendous data
2022-02-04 17:38:20 +05:30
marination
4b62d2d7fe fix: (Linter) Write queries using QB/ORM and other minor lines for semgrep to skip 2022-02-02 12:58:31 +05:30
marination
2933cf243a fix: Failing test, sider and linter
- Remove unused imports
- fix test `test_product_list_attribute_filter_builder`
2022-02-01 12:08:33 +05:30
marination
1d7f313b92 debug: CI 2022-02-01 11:12:05 +05:30
marination
00752ca01d fix: Wrong variable name breaks Cart Items rendering 2022-02-01 11:11:58 +05:30
marination
143ff715e7 fix: (test) set user for price test 2022-02-01 11:11:38 +05:30
marination
606f23b667 fix: Sider and Linter 2022-02-01 11:11:29 +05:30
marination
4f7ec25bbe tests: Variant without web item price fetch and add to cart
- Also, optionally get image from template web item for cart if variant has no image
2022-02-01 11:11:18 +05:30
marination
47c8ad0b94 fix: Cart Logic of Item variant without Website Item 2022-02-01 11:11:11 +05:30
marination
f2fbe9049f fix: Server Side test - teardown correctly 2022-02-01 11:10:04 +05:30
marination
2623046ba7 test: Variant Selector - Fetch next valid Attribute values fetching after selection of one 2022-02-01 11:09:46 +05:30
marination
5a462db207 test: Variant Selector - Attribute Value fetching 2022-02-01 11:09:35 +05:30
marination
6c7b3026c9 fix: Behaviour if Item Variants Cache generation
- Revert to old behaviour where variant doesnt need to be published
- Delete unused functions
2022-02-01 11:08:30 +05:30
marination
20c71edc84 fix: Exclude unpublished items while fetching items from other item groups 2022-02-01 11:07:53 +05:30
Devin Slauenwhite
49cdf9b7b0 fix(e-commerce): shopping cart total quantity (#29076)
* fix: shopping cart total quantity

* fix: linter error
2022-02-01 11:06:33 +05:30
marination
456f27724c fix: Convert Item links to Website Item links in Item Card Group template data
- Changed link option to Website Item in Item card group template
- patch to convert pre-existing data
2022-02-01 11:02:48 +05:30
Devin Slauenwhite
262fcbd9fb fix(test): e-commerce fetch logged-in user item price. 2022-02-01 11:00:37 +05:30
Devin Slauenwhite
18e70e8229 test: e-commerce customer pricing rule 2022-02-01 11:00:28 +05:30
Dany Robert
d4c74b546d fix: no module named 'redisearch' (#28818)
* chore: rename file to avoid the overriding

* fix: rename ref #1

* fix: rename ref in e_commerce_settings

* fix: rename ref in product_search.py

* chore: rename rsearch.py to redisearch_utils.py

* chore: rename rsearch to redisearch_utils in product_search
2022-02-01 10:58:18 +05:30
marination
02d92070be fix: search_box_id instead of search_box_class 2022-02-01 10:55:37 +05:30
marination
6583a83dd3 fix: Sider (missing semicolon) 2022-02-01 10:55:27 +05:30
marination
f63f250630 feat: Allow addition of custom search box
- allow passing custom search box class to bind search actions on
- this allows users to inject and get a custom search box running on any page
2022-02-01 10:55:05 +05:30
marination
7bc087ed44 fix: Merge conflicts, Linter and Server Test
- Resolve inconsistency due to conflict with https://github.com/frappe/erpnext/pull/27050
- Resolve Linter issues (imports and spaces)
- Include customer_reviews.js in bundle, move it to /public/js
2022-02-01 10:51:50 +05:30
marination
9fb61efba8 chore: Fix imports and formatting (linter) & Sider (unused import) 2022-02-01 00:54:54 +05:30
marination
b2b827f50f chore: Adjust to ESbuild and missing imports
- update erpnext web bundle and tweak to fit new build system
- change page id in scss due to change in v14 router
- add missing imports
2022-02-01 00:03:08 +05:30
marination
d7d70ec9e0 fix: Fetch thumbnail from Item master instead of regenerating 2021-11-16 17:52:14 +05:30
marination
296f2f6d52 fix: Pre-commit formatting 2021-11-16 17:51:16 +05:30
marination
ba52d7c23f fix: Website Items with same Item name unhandled, thumbnails missing
- Use naming series for Website Item. There could be two items with same name and different item code
- Fix: Website Item Page view breaks if cart is disabled
- Fix: thumbnails not created for Website Items after patch
- Fix: ‘Request for Quote’ button & cart summary not visible if checkout is disabled
2021-11-16 17:51:01 +05:30
Marica
d637f79517 fix: Handle is_search_module_loaded for redis version < 4.0.0 (#27574)
- Return False if error occurs
2021-11-16 17:48:31 +05:30
Marica
4096b1471f fix: Shopping Cart and Variant Selection (Hotfix PR #27508) 2021-11-16 17:46:57 +05:30
Deepesh Garg
cbfdbd8442 fix: Website item patch fixes 2021-11-16 17:42:04 +05:30
marination
685c453be0 test: Product Discounts 2021-11-16 17:40:49 +05:30
marination
942dedddb4 fix: Paging and Discount filter
- Convert incoming api args to frappe dict
- Change discount filter condition due to reversal of behaviour
2021-11-16 17:40:05 +05:30
marination
78b791cd1d test: Set Price list and company in data engine test setup 2021-11-16 17:38:25 +05:30
marination
e2b9a38f28 fix: Failing search util import and patch
- Use simple function import instead of global variable to check if field is valid to index
- Commit after every 20 items in patch to  create web items from items
2021-11-16 17:38:09 +05:30
marination
bbcbcf7a20 feat: (minor) Backorder indicator and fixed inconsistencies
- Checkbox in website item to indicate if item is on backorder
- Indicator on listing on full page if availbale on backorder.
- fix: Allow provision to add any valid field from Website Item in Search Index
- fix: Settings filter fields are as per Item, make as per Website Item
- "Add to quote/ Go to Quote" if cart checkout is disabled
2021-11-16 17:37:40 +05:30
marination
45f64bd930 Chore: Miscellaneous UI review changes
- Added bg (variable) to pages, card space separation visible
- Removed `show brand line` in settings, shown by default
- Re-arranged settings by importance
- View toggling primary colour is grey
- Only populate recent searches on successful search
- Hit only one server side api, once while searching
- List view primary button float right
- Discounts takes upper limit eg. 10% and below
- Navbar icons only wiggle on qty increase in cart/wishlist
- Pay button in SO portal
- Remove bottom white space below item full page image, min-height fits to content
- List view vertical space between heading and item code
- Empty offer subtitle handled
2021-11-16 17:37:08 +05:30
marination
1bb135b2d3 fix: Sider and CI
- Incorrect path and Settings in price_list.py import due to merge
- Extra space removed in website_item.py
- Changed client side namespace to `erpnext.e_commerce.*`
2021-11-16 17:23:39 +05:30
marination
6b2b9dcee2 refactor: Cache Item Reviews and other review feedback
- `get_doc` -> `get_values` and `db.sql` -> `db.delete` in Wishlist Item deletion
- cache first page of Item Reviews and burst cache on addition and deletion of reviews
- Update redisearch docs link in E Commerce Settings
- Removed unused cint import
- Broke setting attribute context into smaller functions and code cleanup
- Minor recommended items padding tweak
- Item reviews form dict now uses website item as key
- Customer reviews rendered from UI style consistency
- Stock status consistency in listing and full page
- Handle no price in variant dialog for matched item
2021-11-16 17:22:57 +05:30
marination
9aeb211142 chore: Remove Home Page is Products and Sider fixes
- Removed `Home Page is Products` checkbox in E Comm Settings. Can be manually set in Website Settings
- Removed hooks trigger to reset home page as products
- Sider: duplicate color attribute, shift `return` to next line, over-indentation
2021-11-16 17:21:46 +05:30
marination
80fbe16be8 test: Product Query & Filter Engine, Item Group Page
- Test for ProductQuery engine and ProductFilters engine
- Test for engine for Item Group too
- Renamed ‘product_configurator’ to ‘variant_selector’
- Cleaned up filters.py
- Modal freeze backdrop lighter only in cart, since there’s nothing over it
- Fixed unusual spacing in variant selector dialog
- Made `get_child_groups_for_website` more readable
- Replaced ‘Configure’ with ‘Select’ for variant selection
2021-11-16 17:21:17 +05:30
marination
7d1df9d4c3 fix: Error state and passing args for product listing
- Show error state in case of unexpected errors in query engine
- Pass args appropriately from `view.js`
- Use args correctly in `api.py`
- Error handling in `api.py` if query engine raises error
- Instantiated product data engine tests
- Fix dotted path for search api call in `search.js`
2021-11-16 17:18:08 +05:30
marination
335a237383 chore: Re-organise files,remove T&C modal in cart
- Moved product query and filters engine to `product_data_engine` folder
- Moved product grid, list, search, view to `product_ui` folder
- Renamed `website_item_indexing.py` to `redisearch.py`
- Render Terms and Conditions server side along with the rest of the Shopping cart. Don’t make another db call
- Style changes to terms and conditions
- Deleted unused `cart_terms.html`
- Removed print statements
2021-11-16 17:15:05 +05:30
marination
78ee51c6ca chore: debug travis 2021-11-16 17:11:02 +05:30
marination
b4529b8511 test: Recommendations, Reviews and Wishlist
- Tests for verified and unverified item reviewers
- Test for recommended items and their prices
- Test for adding removing items from Wishlist
- Bug: Wishlist deletes all entries of an item code irrespective of user
- Get Item reviews only if enabled
- Removed price fields from Wishlist Item and made fields read only
- Removed unused price stored as data on Wishlist buttons
- Customer Reviews page checks if reviews are enabled else shows No Reviews
- Moved price stock fetching in Wishlist in separate function
- Made fields read only in Item Review
2021-11-16 17:10:23 +05:30
marination
4d254a7ad3 test: Website Item (Item full page)
- Tests for website item. Desk tests and portal tests
- Allow guests on method `get_offer_details`
- Fetch stock details only if `show_stock_availability` is enabled
- Validation for duplicate web items on item merge
- Separate method for `validate_properties_before_merge`
- Common error title and exception `DataValidationError` for merge validations on Item
2021-11-16 17:10:07 +05:30