Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Selling,E-Commerce): Shopping cart quotation without website item. #29085

Conversation

dj12djdjs
Copy link
Collaborator

@dj12djdjs dj12djdjs commented Dec 30, 2021

Problem / Motivation
Our customer is browsing our e-store and cannot find what they are looking for. They call a customer service rep to see if the item is available. The rep adds the item into the quotation and saves it. Without realizing, that item hasn't been added as a Website Item yet.

The customer goes to visit their shopping cart to realize the web page is broken. Caused by:

def decorate_quotation_doc(doc):
for d in doc.get("items", []):
d.update(frappe.db.get_value(
"Website Item",
{"item_code": d.item_code},
["web_item_name", "thumbnail", "website_image", "description", "route"],
as_dict=True)
)
return doc

Error Snapshot

image

Proposed Resolution
If the quotation is of type Shopping Cart validate that all item's have a Website Item associated with it.
Screenshot 2022-04-22 at 1 21 03 PM

@dj12djdjs
Copy link
Collaborator Author

Failing test is unrelated to this PR

@dj12djdjs
Copy link
Collaborator Author

@marination I think this PR will need the e-commerce-fix label since it validates with Website Item doctype not available in develop yet.

@marination marination added the e-commerce-fix E-commerce PRs that need to be front ported to develop label Jan 13, 2022
@stale
Copy link

stale bot commented Feb 1, 2022

This pull request has been automatically marked as inactive because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing.

@stale stale bot added the inactive label Feb 1, 2022
@dj12djdjs
Copy link
Collaborator Author

@deepeshgarg007 @nextchamp-saqib any thoughts about this?

@marination
Copy link
Collaborator

@dj12djdjs sorry haven't been able to actively review PRs. This seems valid.

PS: You can open future e-commerce related stuff on develop. Its merged there too

@marination marination added the backport develop instructs mergify to frontport PR to develop branch label Feb 18, 2022
@marination marination added this to the v13.22 milestone Feb 18, 2022
@marination marination self-assigned this Feb 18, 2022
@ankush ankush modified the milestones: v13.22, 13.23 Mar 15, 2022
@ankush ankush added this to the 13.24 milestone Mar 21, 2022
@marination marination removed this from the 13.24 milestone Apr 22, 2022
@marination marination removed backport develop instructs mergify to frontport PR to develop branch e-commerce-fix E-commerce PRs that need to be front ported to develop labels Apr 22, 2022
@marination marination merged commit ea0fe5e into frappe:version-13-hotfix Apr 22, 2022
frappe-pr-bot pushed a commit that referenced this pull request Apr 26, 2022
## [13.27.1](v13.27.0...v13.27.1) (2022-04-26)

### Bug Fixes

* Add accounting dimensions for round off GL Entry ([dedb90e](dedb90e))
* batch_no filtering not working when batch no is also a number in scientific notation ([#30770](#30770)) ([#30771](#30771)) ([c339305](c339305))
* Check if accounting dimension exists ([1834671](1834671))
* dependent gle reposting (backport [#30726](#30726)) ([#30772](#30772)) ([a6d0938](a6d0938))
* Do not validate while creating accounting dimension ([153b41a](153b41a))
* e_commerce_settings.js ([3a5f5d5](3a5f5d5))
* e_commerce_settings.py ([86c5f4d](86c5f4d))
* First preference to parent cost center rather than round off cost center ([a2d95fc](a2d95fc))
* Handle Multiselect field mapping separately ([dc2f694](dc2f694))
* **india:** 401 & 403 client error while generating IRN ([198bdcf](198bdcf))
* **india:** cess value not considered while validating e-invoice totals ([#30800](#30800)) ([f70fca1](f70fca1))
* **india:** transporter name is null while generating e-way bill ([#30736](#30736)) ([6291b28](6291b28))
* linter ([6dddbb9](6dddbb9))
* Loan doctypes in bank reconciliation ([e69c715](e69c715))
* Mistyped variable name in patch ([e76220e](e76220e))
* monthly attendance sheet ([#30748](#30748)) ([0b4e3f1](0b4e3f1))
* Must not be able to start Job Card if it is related to Work Order that is not started yet ([#29072](#29072)) ([#30755](#30755)) ([b656ffa](b656ffa))
* Query filter fields from Website Item instead of Item master ([bed9e09](bed9e09))
* select doctype as payment_document ([44f0b69](44f0b69))
* **Selling,E-Commerce:** Shopping cart quotation without website item. ([#29085](#29085)) ([ea0fe5e](ea0fe5e))
* SO analysis rpt will fetch SO's without Delivery note as well ([f9d89c7](f9d89c7))
* translation ([#30781](#30781)) ([#30783](#30783)) ([8335ca6](8335ca6))
* Update token to allow updates on protected branch ([baab379](baab379))
* update translation ([#30725](#30725)) ([#30776](#30776)) ([b585262](b585262))
* Use parent cost center for Sales and Purchase Invoice ([fe9f329](fe9f329))
* Use right precision for asset value after full schedule ([#30745](#30745)) ([269e192](269e192))
* Validate field filter wrt to Website Item & re-use validation in Item Group ([34437a8](34437a8))
@frappe-pr-bot
Copy link
Collaborator

🎉 This PR is included in version 13.27.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

deepeshgarg007 pushed a commit to deepeshgarg007/erpnext that referenced this pull request May 13, 2022
## [13.27.1](frappe/erpnext@v13.27.0...v13.27.1) (2022-04-26)

### Bug Fixes

* Add accounting dimensions for round off GL Entry ([dedb90e](frappe@dedb90e))
* batch_no filtering not working when batch no is also a number in scientific notation ([frappe#30770](frappe#30770)) ([frappe#30771](frappe#30771)) ([c339305](frappe@c339305))
* Check if accounting dimension exists ([1834671](frappe@1834671))
* dependent gle reposting (backport [frappe#30726](frappe#30726)) ([frappe#30772](frappe#30772)) ([a6d0938](frappe@a6d0938))
* Do not validate while creating accounting dimension ([153b41a](frappe@153b41a))
* e_commerce_settings.js ([3a5f5d5](frappe@3a5f5d5))
* e_commerce_settings.py ([86c5f4d](frappe@86c5f4d))
* First preference to parent cost center rather than round off cost center ([a2d95fc](frappe@a2d95fc))
* Handle Multiselect field mapping separately ([dc2f694](frappe@dc2f694))
* **india:** 401 & 403 client error while generating IRN ([198bdcf](frappe@198bdcf))
* **india:** cess value not considered while validating e-invoice totals ([frappe#30800](frappe#30800)) ([f70fca1](frappe@f70fca1))
* **india:** transporter name is null while generating e-way bill ([frappe#30736](frappe#30736)) ([6291b28](frappe@6291b28))
* linter ([6dddbb9](frappe@6dddbb9))
* Loan doctypes in bank reconciliation ([e69c715](frappe@e69c715))
* Mistyped variable name in patch ([e76220e](frappe@e76220e))
* monthly attendance sheet ([frappe#30748](frappe#30748)) ([0b4e3f1](frappe@0b4e3f1))
* Must not be able to start Job Card if it is related to Work Order that is not started yet ([frappe#29072](frappe#29072)) ([frappe#30755](frappe#30755)) ([b656ffa](frappe@b656ffa))
* Query filter fields from Website Item instead of Item master ([bed9e09](frappe@bed9e09))
* select doctype as payment_document ([44f0b69](frappe@44f0b69))
* **Selling,E-Commerce:** Shopping cart quotation without website item. ([frappe#29085](frappe#29085)) ([ea0fe5e](frappe@ea0fe5e))
* SO analysis rpt will fetch SO's without Delivery note as well ([f9d89c7](frappe@f9d89c7))
* translation ([frappe#30781](frappe#30781)) ([frappe#30783](frappe#30783)) ([8335ca6](frappe@8335ca6))
* Update token to allow updates on protected branch ([baab379](frappe@baab379))
* update translation ([frappe#30725](frappe#30725)) ([frappe#30776](frappe#30776)) ([b585262](frappe@b585262))
* Use parent cost center for Sales and Purchase Invoice ([fe9f329](frappe@fe9f329))
* Use right precision for asset value after full schedule ([frappe#30745](frappe#30745)) ([269e192](frappe@269e192))
* Validate field filter wrt to Website Item & re-use validation in Item Group ([34437a8](frappe@34437a8))
mergify bot pushed a commit that referenced this pull request May 15, 2022
## [13.27.1](v13.27.0...v13.27.1) (2022-04-26)

### Bug Fixes

* Add accounting dimensions for round off GL Entry ([dedb90e](dedb90e))
* batch_no filtering not working when batch no is also a number in scientific notation ([#30770](#30770)) ([#30771](#30771)) ([c339305](c339305))
* Check if accounting dimension exists ([1834671](1834671))
* dependent gle reposting (backport [#30726](#30726)) ([#30772](#30772)) ([a6d0938](a6d0938))
* Do not validate while creating accounting dimension ([153b41a](153b41a))
* e_commerce_settings.js ([3a5f5d5](3a5f5d5))
* e_commerce_settings.py ([86c5f4d](86c5f4d))
* First preference to parent cost center rather than round off cost center ([a2d95fc](a2d95fc))
* Handle Multiselect field mapping separately ([dc2f694](dc2f694))
* **india:** 401 & 403 client error while generating IRN ([198bdcf](198bdcf))
* **india:** cess value not considered while validating e-invoice totals ([#30800](#30800)) ([f70fca1](f70fca1))
* **india:** transporter name is null while generating e-way bill ([#30736](#30736)) ([6291b28](6291b28))
* linter ([6dddbb9](6dddbb9))
* Loan doctypes in bank reconciliation ([e69c715](e69c715))
* Mistyped variable name in patch ([e76220e](e76220e))
* monthly attendance sheet ([#30748](#30748)) ([0b4e3f1](0b4e3f1))
* Must not be able to start Job Card if it is related to Work Order that is not started yet ([#29072](#29072)) ([#30755](#30755)) ([b656ffa](b656ffa))
* Query filter fields from Website Item instead of Item master ([bed9e09](bed9e09))
* select doctype as payment_document ([44f0b69](44f0b69))
* **Selling,E-Commerce:** Shopping cart quotation without website item. ([#29085](#29085)) ([ea0fe5e](ea0fe5e))
* SO analysis rpt will fetch SO's without Delivery note as well ([f9d89c7](f9d89c7))
* translation ([#30781](#30781)) ([#30783](#30783)) ([8335ca6](8335ca6))
* Update token to allow updates on protected branch ([baab379](baab379))
* update translation ([#30725](#30725)) ([#30776](#30776)) ([b585262](b585262))
* Use parent cost center for Sales and Purchase Invoice ([fe9f329](fe9f329))
* Use right precision for asset value after full schedule ([#30745](#30745)) ([269e192](269e192))
* Validate field filter wrt to Website Item & re-use validation in Item Group ([34437a8](34437a8))

(cherry picked from commit 096dcf0)

# Conflicts:
#	erpnext/__init__.py
hrwX pushed a commit to hrwX/erpnext that referenced this pull request May 20, 2022
## [13.27.1](frappe/erpnext@v13.27.0...v13.27.1) (2022-04-26)

### Bug Fixes

* Add accounting dimensions for round off GL Entry ([dedb90e](frappe@dedb90e))
* batch_no filtering not working when batch no is also a number in scientific notation ([frappe#30770](frappe#30770)) ([frappe#30771](frappe#30771)) ([c339305](frappe@c339305))
* Check if accounting dimension exists ([1834671](frappe@1834671))
* dependent gle reposting (backport [frappe#30726](frappe#30726)) ([frappe#30772](frappe#30772)) ([a6d0938](frappe@a6d0938))
* Do not validate while creating accounting dimension ([153b41a](frappe@153b41a))
* e_commerce_settings.js ([3a5f5d5](frappe@3a5f5d5))
* e_commerce_settings.py ([86c5f4d](frappe@86c5f4d))
* First preference to parent cost center rather than round off cost center ([a2d95fc](frappe@a2d95fc))
* Handle Multiselect field mapping separately ([dc2f694](frappe@dc2f694))
* **india:** 401 & 403 client error while generating IRN ([198bdcf](frappe@198bdcf))
* **india:** cess value not considered while validating e-invoice totals ([frappe#30800](frappe#30800)) ([f70fca1](frappe@f70fca1))
* **india:** transporter name is null while generating e-way bill ([frappe#30736](frappe#30736)) ([6291b28](frappe@6291b28))
* linter ([6dddbb9](frappe@6dddbb9))
* Loan doctypes in bank reconciliation ([e69c715](frappe@e69c715))
* Mistyped variable name in patch ([e76220e](frappe@e76220e))
* monthly attendance sheet ([frappe#30748](frappe#30748)) ([0b4e3f1](frappe@0b4e3f1))
* Must not be able to start Job Card if it is related to Work Order that is not started yet ([frappe#29072](frappe#29072)) ([frappe#30755](frappe#30755)) ([b656ffa](frappe@b656ffa))
* Query filter fields from Website Item instead of Item master ([bed9e09](frappe@bed9e09))
* select doctype as payment_document ([44f0b69](frappe@44f0b69))
* **Selling,E-Commerce:** Shopping cart quotation without website item. ([frappe#29085](frappe#29085)) ([ea0fe5e](frappe@ea0fe5e))
* SO analysis rpt will fetch SO's without Delivery note as well ([f9d89c7](frappe@f9d89c7))
* translation ([frappe#30781](frappe#30781)) ([frappe#30783](frappe#30783)) ([8335ca6](frappe@8335ca6))
* Update token to allow updates on protected branch ([baab379](frappe@baab379))
* update translation ([frappe#30725](frappe#30725)) ([frappe#30776](frappe#30776)) ([b585262](frappe@b585262))
* Use parent cost center for Sales and Purchase Invoice ([fe9f329](frappe@fe9f329))
* Use right precision for asset value after full schedule ([frappe#30745](frappe#30745)) ([269e192](frappe@269e192))
* Validate field filter wrt to Website Item & re-use validation in Item Group ([34437a8](frappe@34437a8))

(cherry picked from commit 096dcf0)

# Conflicts:
#	erpnext/__init__.py
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants