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

Version 15 #216

Open
wants to merge 52 commits into
base: version-15
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
d3bcfb2
Updating hook for e_commerce
umer2001 Jan 4, 2024
9a32f79
whitelist get shipping rules
AnatholyB1 Jan 6, 2024
6caa0da
fix: ensure all arguments passed to `after_rename` hook are accepted …
sagarvora Jan 8, 2024
f648392
Update query.py
deviljutt Jan 16, 2024
1667867
Update webshop_settings.json
deviljutt Jan 16, 2024
abaccc3
fix: create portal user for customer from shopping cart (#58)
rohitwaghchaure Jan 17, 2024
213acba
Update api.py
deviljutt Jan 19, 2024
1810919
Update api.py
deviljutt Jan 19, 2024
81e5af7
update cart
deviljutt Jan 23, 2024
432b350
Update api.py
deviljutt Jan 23, 2024
e386171
Update api.py
deviljutt Jan 23, 2024
0235bef
Update api.py
deviljutt Jan 23, 2024
5998775
fix: customer login error (#60)
rohitwaghchaure Jan 23, 2024
0637e0a
fix: not able to change address through portal (#63)
rohitwaghchaure Jan 24, 2024
9cc48b3
fix: billing address not showing in the portal (#65)
rohitwaghchaure Jan 24, 2024
2b6abdd
fix: Item Tax template is not working for e-commerce (#67)
rohitwaghchaure Jan 25, 2024
ea9ace3
update
deviljutt Jan 26, 2024
8750ce2
fix api
deviljutt Jan 29, 2024
168cb5f
Merge remote-tracking branch 'upstream/develop' into develop
umer2001 Feb 1, 2024
cc25660
add: sync workflow
umer2001 Feb 1, 2024
b3a10f0
Merge branch 'develop' of https://github.com/zaviagodev/webshop into …
umer2001 Feb 1, 2024
2df23ee
Merge upstream changes with unrelated histories
umer2001 Feb 1, 2024
d584497
add: git configs
umer2001 Feb 1, 2024
63ffaf5
add: depth
umer2001 Feb 1, 2024
395ba13
Merge branch 'develop' into version-15
umer2001 Feb 1, 2024
55c63c4
update: Readme
umer2001 Feb 1, 2024
0b46d41
Merge branch 'develop' into version-15
umer2001 Feb 1, 2024
efdc1a2
fix: major issus and some new apis
umer2001 Apr 3, 2024
5bb3e39
fix; many bugs
umer2001 Apr 8, 2024
0566cd4
add: more customization and adjustments
umer2001 Jun 30, 2024
ead21fa
add: payment channel doctype
umer2001 Jun 30, 2024
5873e9b
chnage: field change
umer2001 Jul 2, 2024
746025e
version cut-off
umer2001 Aug 1, 2024
34988a0
fix: add missing properties
umer2001 Aug 14, 2024
df28f30
feat: set default language to English in webshop settings
umer2001 Aug 14, 2024
7ee0974
fix: unexpected argument customer_group to _make_sales_order
umer2001 Oct 9, 2024
fe7153a
fix: webshopItem object has no attribute ''custom_sale_price"
umer2001 Oct 10, 2024
f0a6b5b
fix: 'WebsiteItem' object has no attribute 'custom_discount_type'
umer2001 Oct 10, 2024
1646792
fix: Fix attribute errors in custom_website_item.py
umer2001 Oct 10, 2024
7106344
refactor: Remove unused 'find' function in custom_website_item.py
umer2001 Oct 10, 2024
33a9733
Merge remote-tracking branch 'upstream/version-15' into version-15
umer2001 Oct 11, 2024
9730cc5
fix: make_website_item function in custom_website_item.py
umer2001 Oct 28, 2024
f72c9c1
Merge pull request #3 from zaviagodev/fix/Images-error-when-creating-…
umer2001 Oct 28, 2024
2a4a8a2
Merge remote-tracking branch 'upstream/version-15' into version-15
github-actions[bot] Oct 28, 2024
5a8b340
fix: Add missing property_setters in shipping_rule.json
umer2001 Oct 28, 2024
a95ff56
fix price map issue
deviljutt Oct 28, 2024
802aa88
Merge pull request #4 from zaviagodev/fix-item-doctype-map-to-website…
deviljutt Oct 28, 2024
0f02704
Update custom_website_item.py
deviljutt Oct 28, 2024
43643d9
Merge pull request #5 from zaviagodev/fix-item-doctype-map-to-website…
deviljutt Oct 28, 2024
7b99e58
add: support for param initial_tab
umer2001 Nov 20, 2024
e7a4461
fix: inconsistent tab behaviour
umer2001 Nov 26, 2024
e9b6543
fix: streamline before_save logic and improve custom image handling
umer2001 Dec 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/sync.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Sync with upstream branch

on:
push:
branches:
- version-*
- develop


jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Fetch upstream
run: |
git remote add upstream https://github.com/frappe/webshop.git
git fetch upstream

- name: Sync with upstream
run: |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
git merge upstream/${{ github.ref_name }}

- name: Push to origin
run: |
git push origin ${{ github.ref_name }}
71 changes: 55 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,58 @@
## Frappe Webshop
# Frappe Webshop

Frappe webshop is an Open Source eCommerce Platform
![Frappe Webshop](webshop.png)

## Installation
1. [Install bench](https://github.com/frappe/bench).
2. [Install ERPNext](https://github.com/frappe/bench#installation).
3. Once ERPNext is installed, add the webshop app to your bench by running

```sh
$ bench get-app webshop
```
4. After that, you can install the webshop app on the required site by running
```sh
$ bench --site sitename install-app webshop
```

#### License
GNU GPL V3. (See [LICENSE](LICENSE) for more information).
## Update guide

**Note:** There will be no commit on `develop` branch.

There are 2 remotes:

- origin (zaviagodev/webshop)
- upstream (frappe/webshop)

Each version should have a seprate branch on both remotes like `version-15`, `version-13` e.t.c

### Steps

1. Developer will commit the change in the relative branch example `version-15`
2. After commiting developer should keep the relative branch in sync with its `upstream` branch by:

```bash
git fetch upstream
git merge upstream/<relative branch>
```

3. At times there might be some conflicts developer hast to make sure the conflicts are resolved properly.

### Steps for new version Release

1. Switch to latest branch example `version-15` & make sure its synced with its upstream branch.

```bash
git checkout version-15
git fetch upstream
git merge upstream/version-15
```

2. create new branch from latest branch & push.

```bash
git checkout version-15
git checkout -b version-16
git push origin version-16
```

3. sync with relative upstream branch by

```bash
git fetch upstream version-16
git merge upstream/version-16
```

4. resolve conflicts if any & push.

```bash
git push origin version-16
```
4 changes: 4 additions & 0 deletions webshop/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
"Homepage": "public/js/override/homepage.js",
}

override_whitelisted_methods = {
"webshop.webshop.doctype.website_item.website_item.make_website_item": "webshop.webshop.doctype.website_item.custom_website_item.make_website_item"
}

doc_events = {
"Item": {
"on_update": [
Expand Down
35 changes: 18 additions & 17 deletions webshop/public/js/override/item.js
Original file line number Diff line number Diff line change
@@ -1,37 +1,38 @@
frappe.ui.form.on("Item", {
refresh: function(frm) {
if (!frm.doc.__islocal) {
refresh: function (frm) {
// if (!frm.doc.__islocal) {
if (!frm.doc.published_in_website) {
frm.add_custom_button(__("Publish in Website"), function() {
frm.add_custom_button(__("Publish in Website"), function () {
frappe.call({
method: "webshop.webshop.doctype.website_item.website_item.make_website_item",
args: {
doc: frm.doc,
},
freeze: true,
freeze_message: __("Publishing Item ..."),
callback: function(result) {
frappe.msgprint({
message: __("Website Item {0} has been created.",
[repl('<a href="/app/website-item/%(item_encoded)s" class="strong">%(item)s</a>', {
item_encoded: encodeURIComponent(result.message[0]),
item: result.message[1]
})]
),
title: __("Published"),
indicator: "green"
});
callback: function (result) {
// frappe.msgprint({
// message: __("Website Item {0} has been created.",
// [repl('<a href="/app/website-item/%(item_encoded)s" class="strong">%(item)s</a>', {
// item_encoded: encodeURIComponent(result.message[0]),
// item: result.message[1]
// })]
// ),
// title: __("Published"),
// indicator: "green"
// });
window.location.href = "/app/website-item/" + result.message[0]
}
});
}, __('Actions'));
} else {
frm.add_custom_button(__("View Website Item"), function() {
frappe.db.get_value("Website Item", {item_code: frm.doc.name}, "name", (d) => {
frm.add_custom_button(__("View Website Item"), function () {
frappe.db.get_value("Website Item", { item_code: frm.doc.name }, "name", (d) => {
if (!d.name) frappe.throw(__("Website Item not found"));
frappe.set_route("Form", "Website Item", d.name);
});
});
}
}
// }
}
});
2 changes: 1 addition & 1 deletion webshop/templates/pages/wishlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,6 @@ def set_stock_price_details(items, settings, selling_price_list):
if item.formatted_mrp:
item.discount = price_details.get(
"formatted_discount_percent"
) or price_details.get("formatted_discount_rate")
) or price_details.get("formatted_discount_rate") or price_details.get("formatted_discount_amount")

return items
Loading