Skip to content
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

Added magic-integration param #503

Merged
merged 5 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,9 @@ To install Razorpay Magento module, follow installation steps provided at this r
## How to upgrade plugin using code.zip?
Download the latest code.zip and replace all the contents of the code folder with the new code.zip content. Then follow the same steps which are there for installation through code.zip.

## I am getting the following error message "Column not found: 1054 Unknown column 'main_table.rzp_webhook_notified_at' in 'field list', query was: SELECT main_table.entity_id, main_table.rzp_webhook_notified_at FROM sales_order AS main_table."
If you encounter this error message, update the plugin to the latest version to resolve the issue.

### Support

Visit [https://razorpay.com](https://razorpay.com) for support requests or email [email protected].
23 changes: 22 additions & 1 deletion view/frontend/layout/default.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,29 @@
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<script src="https://checkout.razorpay.com/v1/magic-checkout.js" src_type="url" />
</head>
<body>
<referenceBlock name="head.additional">
<block class="Magento\Framework\View\Element\Text" name="my_script">
<action method="setText">
<argument translate="true" name="text" xsi:type="string">
<![CDATA[
<script>
if (!window.Razorpay) {
window.Razorpay = {};
}
if (typeof window.Razorpay === 'object') {
if (!window.Razorpay.config) {
window.Razorpay.config = {};
}
window.Razorpay.config.integration = 'magic-magento';
}
</script>
<script type="text/javascript" src="https://checkout.razorpay.com/v1/magic-checkout.js"></script>
]]>
</argument>
</action>
</block>
</referenceBlock>
<referenceBlock name="minicart">
<arguments>
<argument name="jsLayout" xsi:type="array">
Expand Down
4 changes: 0 additions & 4 deletions view/frontend/templates/oneclick/buynow.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,5 @@ $isBuyNowEnabled = $configData->getMagicBuyNowStatus();
</button>
</script>

<script type="text/javascript"
src="https://checkout.razorpay.com/v1/magic-checkout.js">
</script>

<?php endif; ?>

2 changes: 0 additions & 2 deletions view/frontend/templates/oneclick/magiccart.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,4 @@ $cartDataCount = count($cartData);
<link rel="stylesheet" type="text/css"
href="<?php echo $block->getViewFileUrl('Razorpay_Magento::css/magic.css'); ?>">

<script type="text/javascript" src="https://checkout.razorpay.com/v1/magic-checkout.js"></script>

<?php endif; ?>