Adding 'terms and conditions' to Infusionsoft shopping cart - opayo

I want to get SagePay on my company's Infusionsoft shop. But, SagePay ask for a checkbox on the checkout to confirm that customers have read the terms and conditions. Totally understandable - but Infusionsoft do not support this option by default.
I am not using the API. Does anyone know a way, perhaps with Javascript, that I could create such an option and NOT let customers proceed to checkout without clicking 'accept'?
Thanks in advance,
Nicole

You should be able to add an onclick listener for the checkout button using something like this:
document.getElementById("idOfButton").onclick = function(e) {
//Look at value of checkbox
//If checked, don't do anything
//else e.stopPropagation
}
In your shopping cart theme you should be able to paste in html for the checkbox.

Related

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! :)

Add to Cart Button on CMS Page in Magento EE 1.13

I am trying to create a landing page for our company which runs on Magento Enterprise Edition 1.13. We use CMS pages for our landing pages and in the past we have been able to create custom add-to-cart buttons directly on the CMS page. It was very simple in fact, we would create a button and send the button to this URL endpoint:
<button class="button btn-cart" title="Add to Cart" onclick="setLocation('/n/magento/checkout/cart/add/product/644/qty/1')" type="button"><span><span>Add to Cart</span></span></button>
It was nice and simple and allowed us to really engage our visitors with awesome landing pages and the ability to add products to cart without leaving this highly optimized page.
You can read a StackOverflow post about the OLD way to do it here: Placing "Add to cart" button on homepage in Magento
However, this no longer works in Magento EE 1.13 according to Magento themselves.
I contacted our Magento support and explained to me that the syntax had changed, now requiring you to put your security hash in the URL. This seemed like a security concern to me, so I questioned it. I was then responded to stating that the security flaw was added to prevent developers from using this anymore without compromising their site. Essentially they are discouraging use of this. They said:
My developer indicated that the ability to add a product to the cart via a direct URL wasn't an intended functionality in Magento, and so the addition of the form_key value was meant to prevent its further use with the upgrade to 1.13.
So my question for all of you, is that if somoene wanted to create add-to-cart buttons on a CMS page, in order to add products without needing to send someone to a product page (where they would no longer be on our optimized landing page), how would I go about doing this?
Is there a way in Magento 1.13 to add a product to cart with a custom button that could be placed in custom HTML within a CMS page? Can this be done with a static block or widget? We really relied on this feature and are now questioning the purpose of Magento EE's $18K a year pricetag with this feature taken away. Please help, thanks!
You'll want to include the formkey block, and then use JavaScript to pull the value from the <input /> tag that is generated and add it to your link URLs, AJAX, etc.
{{block type="core/template" name="formkey" template="core/formkey.phtml"}}
This will work in 1.13:
<button onclick="location.href ='{{config path="web/unsecure/base_url"}}/checkout/cart/add?product=1&qty=1'">Add To Cart</button>
There is a way to modify magento code to allow adding products to shopping cart without form key.
I will post the solution, but anyway I want to warn you that removing form key validation will enable CSRF attacks on your customers!
You need to edit app\code\core\Mage\Checkout\controllers\CartController.php
Find next piece of code:
public function addAction()
{
if (!$this->_validateFormKey()) {
$this->_goBack();
return;
}
Comment first 3 lines of this function:
public function addAction()
{
//if (!$this->_validateFormKey()) {
// $this->_goBack();
// return;
//}
Now it is possible to use static links.

Magento: Create order in backend and have customer complete payment

I'm exploring implementation options in Magento and am wondering if anyone has attempted or found a solution to this scenario...
I would like to be able to setup an order via the Magento backend (add products, set shipping price, etc) then have the customer be able to complete the order by logging into their account and proceeding through the checkout process.
Would be really great if the customer could get an email notification with a link directly to the payment step/checkout.
Is there a public extension that does this or something similar? Is the only option to push the products to a customer's cart then manually notify? Any other approaches on this?
Two possible ways of accomplishing this (assuming that all product are enable in that store)
In Admin create new order for that customer and add all items to quote, then under 'Items Ordered -> Action' click 'Move to Shopping Cart' (items will disappear from quote and should appear in the customer shopping cart once log in)
Create a custom quotation module (or modify new order creation) that email the customer with a link that will restore the quote on so the customer can complete the transaction
The Cart2Quote extension provides exactly that functionality.

Magento 1.7 - Can't Create Invoice for Check/Money Order Sales

I have a Magento store, running on 1.7.0.2.
I am unable to move orders from Pending or Processing to Complete if the payment method is Check/Money Order.
Basically, on the Create Invoice screen, clicking on the [Submit Invoice] button at the bottom of the page does nothing. No errors, no JavaScript warnings, just nothing.
I've tried 3 different browsers, and it's occuring on the live site and on my staging site.
Credit Card orders move to Complete automatically once shipped, Purchase Orders move to Complete by selecting "Capture Offline" when creating an invoice, but still the orders paid for with "Check / Money Order" elude all of my abilities to create an invoice.
Any assistance would be much appreciated.
Check payment methods you have enabled in magento admin.
I don't know if this is related to your issue or not, but I had the same issue. After looking at the page source, i saw that there was no onclick event for the submit invoice button.
What i did, which is hardly a solution, but works for me is add another button that adds the correct "onclick" when clicked. I called it "validate invoice".
edit the file /app/design/adminhtml/default/default/template/sales/order/invoice/create/items.phtml
at line 124, right above <?php echo $this->getChildHtml('submit_button') ?>
I added:
<button onclick="$$('div .submit-button').invoke('writeAttribute','onclick','$(\'edit_form\').submit()');alert('Done');">Validate Invoice</button>
Click "Validate Invoice" button, and then you can submit the invoice.
Again, it's hardly a solution, but it definitely works for me.
What browser and OS are you using? Have had the same issue with a customers of mine, they use Explorer and window. I then tried in Chrome on a Mac and that did the trick.

Magento Checkout: Item out of stock charges customer but no order / order confirmation

I am using Magento 1.6 with the out-of-the-box one page checkout.
Upon the final submit, after the customer has reviewed their order, there seems to be a glitch: If an item has become out of stock, the customer is notified and the order seems not to be going through (no order is created and no confirmation page). However, authorize.net does get the complete transaction request and charges the customer. It seems to only happen if an item has become out of stock. (Customer could be lingering to hit the submit button for quite a while.)
What can I do? Add a java script function to check upon stock on clicking submit?
Is this a known bug?
Thanks!
Is your system set to allow Backorders?
System > Config > Catalog > Inventory > Backorders "No Backorders".
If that is set to disallow backorders I wonder why the add-to-cart button even displays.
If you are using a custom template I might start there in troubleshooting. Switch back to a default template and see if this issue persists.

Resources