-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Paypal checkout not possible with products that have custom options #5938
Comments
+1 Having the same issue here with 2.1.0GA.
Works fine for Simple product with the custom options only (no swatches). Custom options onto Configurable Products (with swatches) fails big time however. Unfortunate Workaround "until a fix" is to kill the swatches and only use the custom options. Meaning you have to create an individual product for each configurations. That's a lot in our case :/ |
You can also install the following plugin, which restores the check: namespace Vendor\Module\Plugin;
class ProductPlugin
{
public function aroundGetOptionById(
\Magento\Catalog\Model\Product $subject,
callable $proceed,
$option
) {
if ($subject->getOptions() == null) {
return null;
}
return $proceed($option);
}
} di.xml: <type name="Magento\Catalog\Model\Product">
<plugin name="prevent-empty-array" type="Vendor\Module\Plugin\ProductPlugin" sortOrder="10"/>
</type> |
Sweet man, I appreciate this. Is this how you get around the custom options 'cannot create order' error? Not at the shell PC atm but will be in a few hours. I'll give it a go. |
@commcad Yes, after debugging we found out that was what caused the issue. In 2.0.7. the method worked differently and pretty much did what the plugin does now. |
too kind bud, sure many could do with a temp fix. Silly question (to you); do we need to create a whole new custom module for this to work or it needs amending code somewhere. If so which *.php your code needs pasting into? Same question RE the di.xml - amending required? where Sure a few others who will soon experience this bug will feel like asking, but won't dare lolll |
Afaik you need to place this in a module (or the global shop di.xml). The di.xml is placed in %module%/etc/di.xml and it's structure is described here http://devdocs.magento.com/guides/v2.0/extension-dev-guide/depend-inj.html You can also use the global shop di.xml under %shop%/app/etc/di.xml, but you have to place the class I posted above somewhere where the shop can find it... I didn't try it yet but you might want to try this if you don't want to use a new module:
This might work if the autoloading finds the class. Otherwise it's propably easiest to create a new module. |
Quality Tweaks! Thanks for pointing us in the correct direction. I-will-try. Need it badly as this bugs brings little over 100 more products to our catalog here :/ This invasion of thumbnails is terrifying our customer base I've recently heard lollll Top man, thanks again |
@mktudock Thanks for reporting this issue. |
+1 @mktudock
|
…at have custom options #5938 - for mainline
…at have custom options #5938 - for mainline
Bug MAGETWO-56699 [GITHUB] Paypal checkout not possible with products that have custom options #5938 - for mainline MAGETWO-58290 [Github]Empty product option is added on each PUT request #5963 MAGETWO-58136 [Github] Shipping and billing address are not set if order placed with payment action Sale #6438 MAGETWO-55608 [GITHUB] M2.1: Not scrollable picture on mobile / product page #5302 MAGETWO-58285 Ajax error message doesn't display in backend MAGETWO-58338 [Github]Problem adding attribute options that start with a number via REST Api #5715 MAGETWO-52575 Unable to apply free shipping to specified method when creating order in admin MAGETWO-57078 [GITHUB] Can't set customer group when creating a new order in the admin. #6162 MAGETWO-58039 Table rate shipping not applying correctly - for mainline
@SerhiyShkolyarenko Will MAGETWO-56699 be included in 2.1.3? |
@mktudock
|
News on this issue? |
Any luck on this? |
Preconditions
Steps to reproduce
Expected result
Actual result
Due to a missing check in getOptionById of the Product model (removed in 0f00630), the product model tries to iterate over null when trying to create the order, because getOptions() returns null.
Seriously, how did you screw up custom options so badly in 2.1.? They are not functional at all!
The text was updated successfully, but these errors were encountered: