Comments (20)
Hi @saigadekar, could you please paste the full error message and describe where (which screen) the error shows up?
from magento2-split-order.
Hi @saigadekar , i faced this issue also.
Replace :
$groups[$attribute][] = $item;
With :
$attribute = 'item_'. $attribute;
$groups[$attribute][] = $item;
This will fix your issue.
from magento2-split-order.
Hi @binnykumar, this is not the right solution, this way you're forcing the conversion of an object to a string. This way you will always get the same attribute, response wrong response.
Please refer this commit with the real fix bd210d7.
This issue will be closed as soon as the PR is merged.
from magento2-split-order.
Hi @williankeller , thanks for the advice.
from magento2-split-order.
after adding the fix above error got cleared but now m getting this error on success page. I tried a single product and also multiple product (1 stock and 1 outofstock product (backorder allowed one))
1 exception(s):
Exception #0 (Exception): Warning: count(): Parameter must be an array or an object that implements Countable i app/code/Magestat/SplitOrder/Block/Checkout/Success.php on line 70
Even if there are two products (1 instock and 1 outofstock) selected Both product attribute are showing out of stock
QuoteHandler.php
$attribute = $this->getProductAttributes($product, $attributes); // this returns out of stock
which makes group count to 1 and further it fails because checkout session is not getting set.
from magento2-split-order.
Closing by fix released: #25
from magento2-split-order.
Even if there are two products (1 instock and 1 outofstock) selected Both product attribute are showing out of stock
which makes group count to 1 and further it fails because checkout session is not getting set.
Did you have executed reindex after applied the stock changes? The selection returns the product attribute value. Please make sure your product is returning In and Out of stock properly.
from magento2-split-order.
yes you can fix this issue by updating this line :
Block/Checkout/Success.php
Look for
if (count($splittedOrders) <= 1) {
return false;
}
And replace it with
if (is_array($splittedOrders) && count($splittedOrders) <= 1) {
return false;
}
after adding the fix above error got cleared but now m getting this error on success page. I tried a single product and also multiple product (1 stock and 1 outofstock product (backorder allowed one))
1 exception(s):
Exception #0 (Exception): Warning: count(): Parameter must be an array or an object that implements Countable i app/code/Magestat/SplitOrder/Block/Checkout/Success.php on line 70Even if there are two products (1 instock and 1 outofstock) selected Both product attribute are showing out of stock
QuoteHandler.php
$attribute = $this->getProductAttributes($product, $attributes); // this returns out of stock
which makes group count to 1 and further it fails because checkout session is not getting set.
from magento2-split-order.
@williankeller - I did reindex and even created a new product but still its returning outofstock as the frontend value and suppose if i try to use another attribute (country_of_manufacture ) this returns me empty value - i have update the data in product and also executed the reindex.
from magento2-split-order.
@binnykumar - You can't use is_array($splittedOrders)
the right way is to validate if this variable is an empty and or condition.
from magento2-split-order.
@saigadekar, @binnykumar
Please refer the Pull Request #27, we did some improvements to make sure the stock is returning the expected value base on the Quantity attribute.
Now you're able to select some options including backorder configuration.
This Pull Request will be merged and a new release will be generated soon.
from magento2-split-order.
Thanks for the help . i Have merged this on my local code and configured it according but now its returing "in" for both the products - product which is having less then zero saleable qty and also for product which is instock.
Please note the backorder feature which is activated is only at product level. meaning only selected products will be allowed for backorder.
from magento2-split-order.
@saigadekar - You have to enable the backorder option or set one of the products to out of stock
from magento2-split-order.
@williankeller - have set the Product to backorder in product edit section and saleable qty in listing is in negative and yet its showing in stock when returning and i even tried Type of Stock Attribute => Stock Quantity (Inventory value) even there its returning the qty but i need saleable qty . I will try to check this in production mode on n will see its giving me correct results then
from magento2-split-order.
@saigadekar,
Unfortunately, it's not possible by using saleable qty. You have to complete the order until the last step to have the value decreased from the inventory.
from magento2-split-order.
I'm not able to reproduce it by following the default flow.
Configuration:
One of my products is "In Stock" with zero qty:
Another product has more than 500 items in stock.
I got 2 orders in the end. One to the out of stock and one to in-stock items.
from magento2-split-order.
@saigadekar
If your product has less than 1 item and stock and you have enabled the backorder configuration under the Magestat module, you should enter in this condition: https://github.com/magestat/magento2-split-order/blob/develop/Model/ExtensionAttributes.php#L60
If you're expecting the value being loaded from the saleable quantity, unfortunately, it's not possible.
from magento2-split-order.
Problem which i am facing is my stock qty is not getting reduced when back order is enabled hence its not going in out of stock condition. but the saleable qty which is shown in listing is getting reduced.
from magento2-split-order.
i added below code in ExtensionAttributes.php - quantityAndStockStatus function.
use Magento\InventorySalesAdminUi\Model\GetSalableQuantityDataBySku;
$this->getSalableQuantityDataBySku = $getSalableQuantityDataBySku;
$salable = $this->getSalableQuantityDataBySku->execute($sku);
if($this->helperData->getBackorder() && $salable[0]['qty'] < 0){
return 'out';
}
from magento2-split-order.
Order is splitting but there is a currency conversion issue -
Please check the raised issue
#30
Thanks,
from magento2-split-order.
Related Issues (20)
- PHPDocs for most functions are incorrect/could be improved
- PHPDocs for most functions are incorrect/could be improved
- Warning: count(): Parameter must be an array or an object that implements Countable HOT 4
- Order Split not working with 'checkout with multiple address' option from cart page. HOT 4
- Splitting Order Based on Stock Status of product in cart HOT 4
- Currency Conversion Issue HOT 2
- Set Different Shipping Method for Each Order
- After installing this plugin , checkout is not working HOT 4
- checkout not working with COD and money order.
- Server error on checkout HOT 1
- Is this works with credit card like payeezy HOT 1
- Getting error when I click Split Order on admin config page HOT 5
- I tries adding custom product attribute. HOT 7
- Not working as expected HOT 14
- Split quote item for Backorder quantity HOT 2
- problem is shipping calculation
- Split order based on multi vendor product
- Product Quantity reducing twice
- Second order is not instantly approved
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from magento2-split-order.