Skip to content

Commit

Permalink
Further PHP8 fixes, fix to variation checkbox saving
Browse files Browse the repository at this point in the history
  • Loading branch information
Mesuva committed Dec 16, 2022
1 parent 72e3f5a commit 6befaba
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 2 additions & 0 deletions single_pages/dashboard/store/products.php
Original file line number Diff line number Diff line change
Expand Up @@ -1015,6 +1015,8 @@ function addtier() {
<% } %>

</div>
<% } else { %>
<input type="hidden" value="" name="poDisplayType[]"/>
<% } %>

<% if (poType == 'static') { %>
Expand Down
3 changes: 0 additions & 3 deletions src/CommunityStore/Discount/DiscountRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -626,9 +626,6 @@ private static function filterDiscounts($result, $cartItems = false) {
$count = 0;

if (is_array($cartItems)) {
$discountProductGroups = [];

$dpg = trim($row['drProductGroups']);
$discountProductGroups = $discountRule->getProductGroups();

if (!empty($discountProductGroups)) {
Expand Down
4 changes: 2 additions & 2 deletions src/CommunityStore/Product/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -1164,11 +1164,11 @@ public static function saveProduct($data)
$product->setManufacturer($manufacturer);


// if we have no product groups, we don't have variations to offer
// if we have no product options, we don't have variations to offer
if (empty($data['poName'])) {
$product->setHasVariations(0);
} else {
$product->setHasVariations(isset($data['pVariations']) ? '1' : '0');
$product->setHasVariations(isset($data['pVariations']) && $data['pVariations'] ? '1' : '0');
}

$product->save();
Expand Down

0 comments on commit 6befaba

Please sign in to comment.