How to prevent user to send multiple Checkout of the same cart in Magento 2 - session

How can I prevent user to checkout 1 cart Session using multiple tabs or multiple browser?
By default, while the last checkout step is still loading, a user can resubmit the same cart multiple times until 1 process is completed resulting to duplicate orders.
Any thoughts on this will be appreciated.

I think the problem comes from your custom module. Maybe you didn't call an ajax attribute or the loading part. By default Magento when you click on checkout button then you can't click other buttons anymore because there will be a loading section appear on the page.
To check you can disable all payment modules and use the default Magento payment method

Related

After update theme options how to update Woocommerce Cart Session?

I have a custom theme options page ( In WordPress Site ) and in that option I have a couple of options for WooCoommerce Mini Cart Customization.
Everything works fine as expected but every time I update some option from backend I can't see that changes right way in frontend due to WooCommerce Cart Session.
As you know WooCommerce mini cart Or custom cart won't be updated automatically if that cart is going through add_to_cart_fragments, So, every time after changing the options I need to update cart session by doing add to cart, remove cart item or update cart item etc.
Honestly, I'm little clueless here, All I want to do is after an update my theme options from backend I want to clear WooCommerce cart session/cache, So, I can see the changes right way without updating or adding anything.
I know WooCommerce cart session can be updated through an ajax But if I going to update theme options in the backend I how can run an ajax in the frontend that will clear WooCommerce cart session for me?
Or have anyone have an idea about it. let me know if you guys don't get me what really I want to do.
Hope it makes sense.
Thanks

Magento One Page Checkout Shipping Method Not Loading in Progress Bar

I am facing some problem in Magento progress bar. In this i am using Magento 1.9 on checkout page when user fill shipping & billing information then after click continue user can see Both Shipping & Billing in Progress Bar. But when user select Shipping method / Payment Method user unable to see Selected Shipping & Payment Method on Right Progress Bar.
what i did:
I already check checkout.xml and opcheckout.js
i already replace checkout.xml & opcheckout.js code with fresh downloaded magento.
Flush Cache indexing
i already test path of progress files in checkout.xml
and
under checkout/onepage/progress/shipping_method.phtml
$this->getCheckout()->getStepData('shipping_method', 'complete')
above syntax return null so code to show shipping method not working in progress bar.
if any one has any idea please ping me.
Thanks
Please install the best firefox add-on, Firebug.
You can see,track,manipulate ajax requests and response there.
It will show you the response of the ajax requests and you can solute the problem easily.
Cheers.!

Ajax Cart empty Prestashop 1.6

In prestashop 1.6
Using Ajax-cart
If i log-in as a Customer and add products to the cart and checkout the order all work.
Then the ajax cart stop working.
If I add a product to the cart and refresh the page the cart return
empty.
If i add a product to the cart and click "go to cart" the cart return empty.
If i log out and log in again, the cart return working for an order, then if i checkout the new order the problem return.
seem to be a problem whith Cookie the is overwritter in some ajax call in ajax-cart.js
I've look this but is not my case :Cart products dissapear on refresh page Prestashop
If i disable ajax cart all work fine.
EDIT
On Google i've found something and seem to be an ajax problem but all the solution suggested don't work.
I was also facing the same issue. You should try the following module and try last two options from the module's configuration and this issue will be gone:
https://github.com/PrestaShop/pscleaner
IMPORTANT: If you are trying it on live site make sure you do not enable first options in this module i.e. Clean up Customers, Clean up Catalog & Orders.
Reply back if you still face the issue.
Cheers!!

Magento Hooks - Will Magento allow me to do this?

I'm going to be starting a E-Commerce project and the client is interested in using Magento. In this project, when a customer adds something to the cart, I'll need to pull them out of the flow, where they'll proceed through a custom wizard-esque area.
They basically design a document using a drag and drop interface. After they finish, that document will be saved as a PDF, and I want them redirected to checkout
So my questions are
Does Magento have hooks available for after an item is added to the
cart ?
If I pull them away to this other section of the site (Wizard
portion), changes they make will potentially add costs to
their cart. Would I still have access to products, prices, and the
cart so that I can continue to modify their cart until they return
to checkout ?
Magento users Event-Observer pattern, where you can hook into virtually any action which is performed and execute your custom code,
Refer to below links,
http://inchoo.net/category/ecommerce/magento/events-observers/
https://gist.github.com/peterjaap/6973324
http://huztechbuzz.wordpress.com/2014/04/26/complete-list-of-all-events-in-magento/
http://www.nicksays.co.uk/magento-events-cheat-sheet-1-7/
So you have to figure out which event you can use and plugin your custom code.
As long as i remember all the cart info ( products/prices ) is stored in the $_SESSION. So you can get all the information from there you need, modify it via your so-called wizzard and udpate the session information after that!
Cheers! :)

Customize Magento checkout process

I have products with individual landing pages. I want the landing pages to contain everything needed to checkout with that product. This includes a dropdown to select the quantity of the product desired, shipping information and billing information. Is this possible? In default Magento, you can't get to the checkout process without first having an item in the cart.
Default Magento allows you to choose where to redirect after a product is added to cart: to the cart overview or back to the page where the "Add to Cart" button was clicked. Using a similar approach you can create an extension that overrides the 'addAction' method of the cart controller to redirect to the checkout page immediately after a product is added to cart.
You can't go to checkout with an empty shopping cart, but redirecting after the add to cart action allows customers to skip the cart page, if that is what you intend to achieve.
It is also possible to use the billing and shipping information the customer submits in the landing page for the checkout - your extension will have to validate it and save into the quote object as if it was submitted in the respective checkout steps.
Developing such an extension would not be a simple task - checkout is a very sensitive matter.

Resources