Call cms page from custom module The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Call of my custom module in a CMS Page not workingDisable Cache in CMS Page Using a Custom ModuleCustom price for a productNo stock decrease at order if certain conditions are metHow to stop customer registration if the validation fails?Magento2: Re-direct to custom URL from observerMagento Custom Module in CMS Page Not Workingcatalog_product_collection_load_after causing maximum nesting issue for configurable productsSimple Observer not firing on eventAdd block from custom module to CMS page not working
Store Dynamic-accessible hidden metadata in a cell
Single author papers against my advisor's will?
Word for: a synonym with a positive connotation?
What's the point in a preamp?
should truth entail possible truth
Mortgage adviser recommends a longer term than necessary combined with overpayments
My body leaves; my core can stay
Why not take a picture of a closer black hole?
Deal with toxic manager when you can't quit
How do spell lists change if the party levels up without taking a long rest?
Why doesn't a hydraulic lever violate conservation of energy?
Is there a writing software that you can sort scenes like slides in PowerPoint?
Windows 10: How to Lock (not sleep) laptop on lid close?
Student Loan from years ago pops up and is taking my salary
The following signatures were invalid: EXPKEYSIG 1397BC53640DB551
How to read αἱμύλιος or when to aspirate
Did the UK government pay "millions and millions of dollars" to try to snag Julian Assange?
Are spiders unable to hurt humans, especially very small spiders?
Button changing its text & action. Good or terrible?
Homework question about an engine pulling a train
Can I visit the Trinity College (Cambridge) library and see some of their rare books
How do you keep chess fun when your opponent constantly beats you?
Using dividends to reduce short term capital gains?
What information about me do stores get via my credit card?
Call cms page from custom module
The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Call of my custom module in a CMS Page not workingDisable Cache in CMS Page Using a Custom ModuleCustom price for a productNo stock decrease at order if certain conditions are metHow to stop customer registration if the validation fails?Magento2: Re-direct to custom URL from observerMagento Custom Module in CMS Page Not Workingcatalog_product_collection_load_after causing maximum nesting issue for configurable productsSimple Observer not firing on eventAdd block from custom module to CMS page not working
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have created an event observer in a module.
Observer is called after checkout_card_add
event.
I want to call a cms page from the module if a certain condition is met.
My observer.php
file
<?php
class Rohan_Module2_Model_Observer
public function changeUserGroup(Varien_Event_Observer $observer)
Mage::log('function entered:');
$customer1 = Mage::getModel('customer/customer')->load($customerId);
$attr = $customer1->getCustomattribute();
if(some if conditon about $attr)
//if true redirect to cms page about-us url(http://127.0.0.1/magento1-test/index.php/about-magento-demo-store)
How can i call a CMS Page from this observer.php
file?
magento-1.9 module event-observer cms cms-pages
add a comment |
I have created an event observer in a module.
Observer is called after checkout_card_add
event.
I want to call a cms page from the module if a certain condition is met.
My observer.php
file
<?php
class Rohan_Module2_Model_Observer
public function changeUserGroup(Varien_Event_Observer $observer)
Mage::log('function entered:');
$customer1 = Mage::getModel('customer/customer')->load($customerId);
$attr = $customer1->getCustomattribute();
if(some if conditon about $attr)
//if true redirect to cms page about-us url(http://127.0.0.1/magento1-test/index.php/about-magento-demo-store)
How can i call a CMS Page from this observer.php
file?
magento-1.9 module event-observer cms cms-pages
add a comment |
I have created an event observer in a module.
Observer is called after checkout_card_add
event.
I want to call a cms page from the module if a certain condition is met.
My observer.php
file
<?php
class Rohan_Module2_Model_Observer
public function changeUserGroup(Varien_Event_Observer $observer)
Mage::log('function entered:');
$customer1 = Mage::getModel('customer/customer')->load($customerId);
$attr = $customer1->getCustomattribute();
if(some if conditon about $attr)
//if true redirect to cms page about-us url(http://127.0.0.1/magento1-test/index.php/about-magento-demo-store)
How can i call a CMS Page from this observer.php
file?
magento-1.9 module event-observer cms cms-pages
I have created an event observer in a module.
Observer is called after checkout_card_add
event.
I want to call a cms page from the module if a certain condition is met.
My observer.php
file
<?php
class Rohan_Module2_Model_Observer
public function changeUserGroup(Varien_Event_Observer $observer)
Mage::log('function entered:');
$customer1 = Mage::getModel('customer/customer')->load($customerId);
$attr = $customer1->getCustomattribute();
if(some if conditon about $attr)
//if true redirect to cms page about-us url(http://127.0.0.1/magento1-test/index.php/about-magento-demo-store)
How can i call a CMS Page from this observer.php
file?
magento-1.9 module event-observer cms cms-pages
magento-1.9 module event-observer cms cms-pages
edited Apr 9 at 6:31
Muhammad Anas
607318
607318
asked May 7 '17 at 12:26
Rohan BhatiaRohan Bhatia
122
122
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
<?php
class Rohan_Module2_Model_Observer
public function changeUserGroup(Varien_Event_Observer $observer)
Mage::log('function entered:');
$customer1 = Mage::getModel('customer/customer')->load($customerId);
$attr = $customer1->getCustomattribute();
if(some if conditon about $attr)
//This will redirect to about-us page
Mage::app()->getResponse()->setRedirect(Mage::getBaseUrl().'about-us')->sendResponse();
exit();
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f173348%2fcall-cms-page-from-custom-module%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
<?php
class Rohan_Module2_Model_Observer
public function changeUserGroup(Varien_Event_Observer $observer)
Mage::log('function entered:');
$customer1 = Mage::getModel('customer/customer')->load($customerId);
$attr = $customer1->getCustomattribute();
if(some if conditon about $attr)
//This will redirect to about-us page
Mage::app()->getResponse()->setRedirect(Mage::getBaseUrl().'about-us')->sendResponse();
exit();
add a comment |
<?php
class Rohan_Module2_Model_Observer
public function changeUserGroup(Varien_Event_Observer $observer)
Mage::log('function entered:');
$customer1 = Mage::getModel('customer/customer')->load($customerId);
$attr = $customer1->getCustomattribute();
if(some if conditon about $attr)
//This will redirect to about-us page
Mage::app()->getResponse()->setRedirect(Mage::getBaseUrl().'about-us')->sendResponse();
exit();
add a comment |
<?php
class Rohan_Module2_Model_Observer
public function changeUserGroup(Varien_Event_Observer $observer)
Mage::log('function entered:');
$customer1 = Mage::getModel('customer/customer')->load($customerId);
$attr = $customer1->getCustomattribute();
if(some if conditon about $attr)
//This will redirect to about-us page
Mage::app()->getResponse()->setRedirect(Mage::getBaseUrl().'about-us')->sendResponse();
exit();
<?php
class Rohan_Module2_Model_Observer
public function changeUserGroup(Varien_Event_Observer $observer)
Mage::log('function entered:');
$customer1 = Mage::getModel('customer/customer')->load($customerId);
$attr = $customer1->getCustomattribute();
if(some if conditon about $attr)
//This will redirect to about-us page
Mage::app()->getResponse()->setRedirect(Mage::getBaseUrl().'about-us')->sendResponse();
exit();
answered May 8 '17 at 5:00
Prince PatelPrince Patel
14.6k65481
14.6k65481
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f173348%2fcall-cms-page-from-custom-module%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown