Skip to content

Commit b0a0f36

Browse files
authored
Merge pull request #208 from moderntribe/release/3.18.0
packaged version 3.18.0
2 parents 9e2c0d9 + 667eadb commit b0a0f36

File tree

204 files changed

+1777
-444
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

204 files changed

+1777
-444
lines changed

CHANGELOG.md

+26
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,30 @@
11
# Changelog
22

3+
## [3.18.0]
4+
5+
### Added
6+
7+
- Added support for new larger image size and zoom features on the PDP in multiple
8+
supported WordPress themes.
9+
- Added version numbers to templates. Diagnostics panel will now check major versions of overridden files.
10+
- Support for Flatsome theme added starting with version 3.10.1 of the theme.
11+
- Added filter to Cart_Mapper map (PR #201).
12+
13+
### Changed
14+
15+
- Changed filtering on Brand and Product Category descriptions to use `wp_kses_post()` instead
16+
of `wp_filter_kses()`. This allows the use of more HTML tags in those term descriptions.
17+
- Added some additional refined style adjustments to the WordPress Twenty-Twenty theme.
18+
- Made a change to the onboarding page for connecting your channel. Form sections now start
19+
open so you can edit all fields immediately.
20+
- Both enabled site ssl and Sitewide HTTPS setting in BC store are required to use embedded checkout.
21+
22+
### Fixed
23+
24+
- Empty cart destination link from Customizer is properly linked in the cart.
25+
- Product sync reflects adding/removing products from store channels.
26+
27+
328
## [3.17.0]
429

530
### Added
@@ -1136,6 +1161,7 @@
11361161
in fact, reset postdata, so far as Gutenberg 3.2.0 is concerned.
11371162

11381163

1164+
[3.18.0]: https://github.com/bigcommerce/bigcommerce-for-wordpress/compare/3.17.0...3.18.0
11391165
[3.17.0]: https://github.com/bigcommerce/bigcommerce-for-wordpress/compare/3.16.0...3.17.0
11401166
[3.16.0]: https://github.com/bigcommerce/bigcommerce-for-wordpress/compare/3.15.0...3.16.0
11411167
[3.15.0]: https://github.com/bigcommerce/bigcommerce-for-wordpress/compare/3.14.0...3.15.0

assets/css/bc-gutenberg.css

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/bc-gutenberg.min.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/master-amp.css

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/master-amp.min.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/master.css

+191-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/master.min.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/dist/admin/scripts.js

+260-241
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/dist/admin/scripts.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/dist/admin/vendor.js

+8-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/dist/admin/vendor.min.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/dist/scripts.js

+53-53
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/dist/scripts.min.js

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/dist/vendor.js

+29-29
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/dist/vendor.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/src/admin/settings/toggle-section.js

+16
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import _ from 'lodash';
77
import delegate from 'delegate';
8+
import queryToJson from 'utils/data/query-to-json';
89
import Choices from 'choices.js';
910
import * as tools from '../../utils/tools';
1011
import { up, down } from '../../utils/dom/slide';
@@ -145,6 +146,20 @@ const cacheElements = () => {
145146
el.settingSelectFields = tools.getNodes('.bc-field-choices', true, el.container, true);
146147
};
147148

149+
/**
150+
* @function maybeOpenSections
151+
* @description Maybe open specific sections depending on the page we're displaying.
152+
*/
153+
const maybeOpenSections = () => {
154+
// Case: BigCommerce onboading Channel Settings page should have sections open.
155+
if (queryToJson(el.url.query).page === 'bigcommerce_channel') {
156+
el.settingSections.forEach((section) => {
157+
const target = tools.getNodes('section-toggle-target', false, section)[0];
158+
expandSection(section, target);
159+
});
160+
}
161+
};
162+
148163
/**
149164
* @function bindEvents
150165
* @description bind all event listeners to this function.
@@ -179,6 +194,7 @@ const init = () => {
179194
scrollToSection(section);
180195
}
181196

197+
maybeOpenSections();
182198
bindEvents();
183199
};
184200

assets/js/src/public/cart/add-to-cart.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { trigger } from 'utils/events';
1111
import { wpAPIAddToCartAjax } from 'utils/ajax';
1212
import { CART_API_BASE, AJAX_CART_ENABLED, AJAX_CART_NONCE } from 'publicConfig/wp-settings';
1313
import { NLS } from 'publicConfig/i18n';
14-
import { cartMenuSet } from './cart-menu-item';
14+
import { cartMenuSet, updateFlatsomeCartMenuQty, updateFlatsomeCartMenuPrice } from './cart-menu-item';
1515

1616
const state = {
1717
isFetching: false,
@@ -246,6 +246,8 @@ const handleAjaxAddToCartRequest = (e) => {
246246

247247
createAjaxResponseMessage(form, NLS.cart.ajax_add_to_cart_success, false);
248248
updateCartItemCount(res.body);
249+
updateFlatsomeCartMenuQty();
250+
updateFlatsomeCartMenuPrice(res.body);
249251
trigger({ event: 'bigcommerce/update_mini_cart', native: false });
250252
});
251253
};

assets/js/src/public/cart/ajax-items.js

+15-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { CART_API_BASE } from 'publicConfig/wp-settings';
1414
import { CART_ID_COOKIE_NAME, CART_ITEM_COUNT_COOKIE } from 'bcConstants/cookies';
1515
import { NLS } from 'publicConfig/i18n';
1616
import { cartEmpty } from './cart-templates';
17-
import { updateMenuQtyTotal, updateCartMenuItem } from './cart-menu-item';
17+
import { updateMenuQtyTotal, updateCartMenuItem, updateFlatsomeCartMenuQty, updateFlatsomeCartMenuPrice } from './cart-menu-item';
1818

1919
const timeoutOptions = {
2020
delay: 500,
@@ -138,6 +138,17 @@ const updatedCartTotals = (data = {}) => {
138138
});
139139
};
140140

141+
const handleFlatsomeTheme = (data = {}) => {
142+
const flatsome = tools.getNodes('.bc-wp-flatsome-theme', false, document, true)[0];
143+
144+
if (!flatsome) {
145+
return;
146+
}
147+
148+
updateFlatsomeCartMenuQty();
149+
updateFlatsomeCartMenuPrice(data);
150+
};
151+
141152
/**
142153
* @function cartItemQtyUpdated
143154
* @description handle the API response when a cart item is updated.
@@ -151,6 +162,7 @@ const cartItemQtyUpdated = (data = {}) => {
151162
updateCartItems(data);
152163
updatedCartTotals(data);
153164
updateMenuQtyTotal(data);
165+
handleFlatsomeTheme(data);
154166
};
155167

156168
/**
@@ -247,11 +259,13 @@ const removeCartItem = (itemRow = '', data = {}) => {
247259
Cookies.remove(CART_ID_COOKIE_NAME);
248260
Cookies.remove(CART_ITEM_COUNT_COOKIE);
249261
updateCartMenuItem();
262+
handleFlatsomeTheme(data.body);
250263
return;
251264
}
252265

253266
updatedCartTotals(data.body);
254267
updateMenuQtyTotal(data.body);
268+
handleFlatsomeTheme(data.body);
255269
};
256270

257271
/**

assets/js/src/public/cart/cart-menu-item.js

+20-1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,25 @@ const updateMenuQtyTotal = (data = {}) => {
4141
updateCartMenuItem();
4242
};
4343

44+
const updateFlatsomeCartMenuPrice = (data = {}) => {
45+
const price = !_.isEmpty(data) ? data.subtotal.formatted : '';
46+
const menuItemPrice = tools.getNodes('.header-cart-link .cart-price', false, document, true)[0];
47+
48+
menuItemPrice.innerHTML = price;
49+
};
50+
51+
const updateFlatsomeCartMenuQty = () => {
52+
let currentCount = Cookies.get(CART_ITEM_COUNT_COOKIE);
53+
54+
if (!currentCount) {
55+
currentCount = '0';
56+
}
57+
58+
const menuItemQty = tools.getNodes('.header-cart-link .cart-icon strong', false, document, true)[0];
59+
60+
menuItemQty.innerHTML = currentCount;
61+
};
62+
4463
const updateMenuQtyOnPageLoad = () => {
4564
const cookie = Cookies.get(CART_ITEM_COUNT_COOKIE);
4665

@@ -59,4 +78,4 @@ const updateMenuQtyOnPageLoad = () => {
5978
}
6079
};
6180

62-
export { cartMenuSet, updateMenuQtyTotal, updateMenuQtyOnPageLoad, updateCartMenuItem };
81+
export { cartMenuSet, updateMenuQtyTotal, updateMenuQtyOnPageLoad, updateCartMenuItem, updateFlatsomeCartMenuPrice, updateFlatsomeCartMenuQty };

assets/js/src/public/cart/mini-cart-nav.js

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ const handleClicks = (e) => {
5959
}
6060

6161
e.preventDefault();
62+
e.stopPropagation();
6263

6364
const miniCartWrapper = tools.getNodes('bc-mini-cart', false, e.delegateTarget.parentNode)[0];
6465

assets/js/src/public/product/pricing.js

+4
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,10 @@ const filterAPIPricingData = (type = '', APIPricingNode = '', data = {}) => {
162162
const pricingNodes = [];
163163
const pricingContainer = tools.closest(APIPricingNode, '[data-js="bc-product-pricing"]');
164164

165+
if (!pricingContainer) {
166+
return;
167+
}
168+
165169
// This will hide the spinner because state.isFetching is false.
166170
maybePriceIsLoading(pricingContainer);
167171

assets/pcss/content/cart/_mini-cart.pcss

+3
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,9 @@
151151
opacity: 1;
152152
visibility: visible;
153153
background-color: var(--color-white);
154+
height: auto;
155+
max-height: calc(100vh - 132px);
156+
overflow: scroll;
154157
}
155158

156159
.bc-mini-cart {

assets/pcss/content/components/_gallery.pcss

+6-3
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@
1717
}
1818
}
1919

20-
img[data-zoom] {
20+
.bc-product-single & {
2121

22-
&:hover {
23-
cursor: zoom-in;
22+
img[data-zoom] {
23+
24+
&:hover {
25+
cursor: zoom-in;
26+
}
2427
}
2528
}
2629

assets/pcss/content/single/_product-wish-list.pcss

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
.bc-pdp-wish-list-wrapper {
22
position: relative;
3-
z-index: 1;
43
}
54

65
button.bc-btn.bc-pdp-wish-list-toggle,

assets/pcss/utilities/_all.pcss

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
@import "variables/transitions";
2525
@import "variables/typography";
2626
@import "variables/spacers";
27+
@import "variables/containers";
2728

2829
/* Settings */
2930
@import "settings/grid";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
:root {
2+
/* 960 */
3+
--container-960: 960px;
4+
5+
/* 1200 */
6+
--container-1140: 1140px;
7+
8+
/* 1200 */
9+
--container-1200: 1200px;
10+
11+
/* 1440 */
12+
--container-1440: 1440px;
13+
}

assets/pcss/utilities/variables/_media-queries.pcss

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
@custom-media --viewport-wpadmin (min-width: 783px);
77
@custom-media --viewport-wpadmin-max (max-width: 782px);
88
@custom-media --viewport-full (min-width: 960px);
9+
@custom-media --viewport-981 (min-width: 981px);
910
@custom-media --viewport-min-1000 (min-width: 1000px);
1011
@custom-media --viewport-max-1000 (max-width: 1000px);
1112
@custom-media --viewport-large (min-width: 1200px);

assets/pcss/wp-themes/_all.pcss

+6
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,10 @@
99
*/
1010

1111
/* Themes */
12+
@import "twenty-sixteen-theme";
13+
@import "twenty-nineteen-theme";
1214
@import "twenty-twenty-theme";
15+
@import "genesis-themes";
16+
@import "shoptimizer";
17+
@import "veganos";
18+
@import "flatsome";

assets/pcss/wp-themes/_flatsome.pcss

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/* Shoptimizer for BigCommerce for WordPress Theme Styles */
2+
.bc-wp-flatsome-theme {
3+
/* Case: Login popup has no left and right padding. */
4+
.lightbox-content .bc-account-page {
5+
padding-left: 60px;
6+
padding-right: 60px;
7+
}
8+
9+
/* Login Form needs additional padding. */
10+
p.login-submit {
11+
@media (--viewport-medium) {
12+
padding-right: 28px;
13+
}
14+
}
15+
}

0 commit comments

Comments
 (0)