Magento-4U team love to hear what you think about Magento-4U. If you have any queries, questions, concerns, or just want to tell us how excited you are about Magento and Magento-4U, drop us a note using the form below. We will back to you within possible short time.
Regards
Moinul Islam Al-Mmaun
Moderator, Magento-4U Team
Hi, I read your posts about creating new module, but what I want to do I didn’t find can you help me?
I want to create functionality which will call from My account(f.e. event link from left menu) then I want creat a form for new event (f.e. title description and date) and I want to save it to database. Can you help me I don’t know how to do it from frontend. which class extended need to use. write please if can to my email
You need to override and extend customer module. Here is some hits.
1. Create new customer module in local pool.
2. Override Account controller (Mage_Customer_AccountController) and write your new method. For this see CONTROLLER OVERRIDE post.
3. Create block for your new method and override your new block. For this see BLOCK OVERRIDE post.
4. Define layout xml for new method.
5. Create template.
6. To set this page in My Account left navigation var add like below code in customer_account tag under customer layout xml.
<customer_account> <reference name="left"> <block type="customer/account_navigation" name="customer_account_navigation" before="-" template="customer/account/navigation.phtml"> <action method="addLink" translate="label" module="customer"><name>account_view</name><path>customer/account/view/</path><label>Account Details</label></action> </block> </customer_account>7. To save data in database create post method in controller and use $customer->save(); to update customer profile. Or do as you need.
Hope it will make sense. You have to try hard. If you still face problem let me know.
Hi can you help me how to create separate tab in customer account board through override concept? I am becoming mad about this task. so please help me how to create the above task in customer override module…I will be waitong for your valuable reply
Hi can you help me how to create separate tab in customer account board through override concept? I am becoming mad about this task. so please help me how to create the above task in customer override moduleā¦I will be waitong for your valuable reply
Hi Moinul and many thanks for your enlightment in Magento darkness.
Could you please precise if a minimum version of Magento is expected to follow your “how to override a controller” step-by-step post ?
’cause I’m experiencing many trouble with my good old 1.1.8 … (trying to override the cart Controller in order to automatically add a free product)
Many thanks once again for your blog !
E. Catrysse
E. Catrysse, You can try using this.
<global> <rewrite> <m4u_checkout_onepage_savepayment> <from><![CDATA[#^/checkout/#]]></from> <to>/checkout/onepage/savePayment</to> </m4u_checkout_onepage_savepayment> </rewrite> </global> <frontend> <routers> <m4u_checkout> <use>standard</use> <args> <module>m4u_Checkout</module> <frontName>checkout</frontName> </args> </m4u_checkout> </routers> </frontend>You have to mention all rewrite method in global xml
<m4u_checkout_cart_#####> <from><![CDATA[#^/checkout/#]]></from> <to>/checkout/cart/#####</to> </m4u_checkout_cart_#####>Thank you for your quick and kind reply but this doesn’t work with me…
/freegift/checkout/cart/delete/
…
standard
Pepper_Freegift
freegift
…still leads me to 404 empty page…
My overriding method seems correct yet:
require_once ‘Mage/Checkout/controllers/CartController.php’;
class Pepper_Freegift_Checkout_CartController extends Mage_Checkout_CartController
{
…
}
I’m starting to think myself not Magento-compatible…
Your post is not clear to me. Please clarify or you can send files at moinul_006@yahoo.co.uk
plz mail me i need help on magento
vaseem@doomshell.com
Vaseem, Let me know how can I help you ? Thanks
i want to integrate paypal payment module in the third step of payment, suppose u choose product to buy and now u click on add to cart and goes to payment page now u can see only two options , pay by money order and other, so here i want option to paypal pay, when user click on that he will go to paypal page for payment.
how can i do this.
thanks for mailing me
Assalaamo Alaikum
I like to launch an e-commerce website in near future and would like to use Magento commerce since this seems to be the most cost effective way. I would like to talk to you about this on IM or over the phone. Please let me know the good time to talk to you.
Regards,
Hi Moinul Islam,
First of all thanks a lot for enlightening all with your rays of knowledge. You really have been posting some seriously good posts… I just wanted to know if u could help me solve one of my issues. How do i force a customer to join a customer group upon signup? Am not sure how it could be done but m stuck a bit on it. Hope u will come up with solution as u always do. Thanks a lot in advance.
hi Moinul,
u know how to override Mage_Core_Block_Template?
hlp me if you know how please…
I like this post:
http://magento4u.wordpress.com/tag/cms-index-controller-override/
but how do i override the template as well.
i am trying to do that for the index action but it doesnt seem to work.
Hello, There are no way to override template. But you can create new theme to modify your template files. or you can create new template files by point that in layout xml.
Hi i just wanted to know how to create a module for admin panel.like say a menu bar..where i can upload files(flash files) to home and it is dynamic..when i change it shud change..
so pls help me!
Thanks Mamun
I managed to do that for a regular controller but it doesn’t seem to work with the CMS module. is there some special to be done? any sample code for that? I already have a new theme and changing the theme for any other control works.
Hi
Can you please explain me How to add limit option for records in API Call.
I want to display only 25 records on one page. And for next pagination will be used.
What extra parameter will require for this in API call.
Hi,
I want to edit
Page/Block/Html/Header.php and modify getWelcome function. Also I want
to add 2 more functions.
To do this I created following folder structure in local
MyNamespace/Page/Block/Html/Header.php
MyNamespace/Page/etc/config.xml
my config.xml looks like following
MyNamespace_Page_Block_Html_Header
my Header.php looks like
class MyNamespace_Page_Block_Html_Header extends
Mage_Page_Block_Html_Header
{
public function getWelcome()
{
error_log(\”I am called \”,0);
}
}
my Module/MyNamespace_All.xml looks like followng
true
local
Some how the system do not call my getWelcome
Please help me identify my mistake, I think I am having some problem
in MyNamespace/Page/etc/config.xml
Please help
Thanks
Saurabh
Hello, you didn’t post your config.xml code.
You have to define xml to rewrite this block in config.xml.
Thanks
hi,
I am creating a file in csv to get product info in module , i need to download the file by providing link, let me know how to create the controller for those in existing module
EOS Web has extensive expertise in magento commerce websites.
They have many modules for FREE in your web site http://magentocommerce.eoswebdevelopment.com/en/
Take a few minutes and look at this page.
Enjoy !
I’m trying to override app/code/Mage/Customer/Block/Account/Dashboard/Address.php
I made /app/code/local/Easydelivery/etc/config.xml:
0.1.0
Easydelivery_Customer_Block_Account_Dashboard_Address
———————–
I made
/app/etc/modules/Easydelivery_Customer.xml:
true
local
——————————————-
And then finally
/app/code/local/Easydelivery/Customer/Block/Account/Dashboard/Address.php:
class Easydelivery_Customer_Block_Account_Dashboard_Address extends Mage_Customer_Block_Account_Dashboard_Address
{
// override existing method
//write new function
public function getPrimaryBillingAddressEditUrl()
{
return Mage::getUrl(‘customer/address/edit1′, array(‘id’=>$this->getCustomer()->getDefaultBilling()));
}
It has to change
return Mage::getUrl(‘customer/address/edit’
to
return Mage::getUrl(‘customer/address/edit1′,
But the link won’t change!
Can you help me?
Hi, great site!! Been very helpful already, thanks – definitely one of the best resources out there.
Just wondering if you can help me work this one out – I’m trying to fire off a POST query to another domain using fsockopen() when the customer completes an order.
My fsockopen code works fine outside of Magento, but I can’t work out the best place to put it in the flow of the app to make it work, plus I need to access some of the order variables to send them as part of the POST query.
Could you point me in the right direction by any chance?
Thanks,
Rich
Hi Rich,
Check if you can post it via CURL
Regards,
Saurabh
Can somebody please help how to override the GalleryController
TWM_Adminhtml_Catalog_Product_GalleryController extends Mage_Adminhtml_Catalog_Product_GalleryController
Hi Helper, i m very new to Magento. Now i would like to create webservices for my website.
my purpose is my client(vendor) will upload, edit prodcuts from webservices. but i have no idea where to start. could you give me step by step guide for setting up? thanks for help.
Dear Zarni, you can see this post https://magento4u.wordpress.com/category/magento-api/
It will helpful for your initial step. Thanks
I want to add some field like zip code,tax id and Business Reseller Licence Number in user registration form.For this,i edited register.phtml and after that manually add records in eav_attribute table.But this is not working.i am a beginner in magento.Plz help me.
Dear Kajal, see this new post.
https://magento4u.wordpress.com/2011/03/28/add-extra-fields-in-registration-page/
Hope it will helpful for you. Thanks
Hi, i created an API, right now its communicating with clients DB. But now i want to have the users log in with their credetials without loggin in.
Step one is working fine. Magento users are being registered on the other DB
Contact me, i will send you the files
Thanks
S
hi,
I want to add “browsing by color option” into top this link:
http://127.0.0.1/magento/index.php/canon-digital-rebel-xt-8mp-digital-slr-camera-with-ef-s-18-55mm-f3-5-5-6-lens-black.html
please, can anyone help me in this case?
Hi Moinul,
I’m trying to split up a cart so that when my user checks out, only some of the items are saved, and some are checked out. My thread about it is here: http://www.magentocommerce.com/boards/viewthread/210032/
I have some items that when they come into the cart, need to be checked out, and processed immediately bypassing the cart and the checkout. Then there are other products that can be saved in the cart. I have all that working. What I am having trouble with is when the user has items in the cart, and they select an item that needs immediate checkout, I want to be able to just check out that item and save the other stuff in the cart for when they are ready to checkout. I can go through the quote and remove everything that doesn’t need immediate checkout, and checkout the item I need, but then the cart is empty and those items are lost…
Is there a way to back up the quote, or save it, and then after I check out the immediate checkout item, reload or restore the entire quote, remove the item I already checked out, and save the cart?
I have been trying that with no success…
Any ideas? Can you help?
Thanks!
hi…Moinul ,
I am trying to add few fields to the default account registration and billing forms in customer and checkout modules in magneto. I have tried few things such as creating different templates in design/frontend/default/myfolder/ and over riding Mage_Customer_Model_Entity_Setup,Mage_Customer_Block_Form_Register in config.xml in my local code base . but so far nothing has worked .can you point me in the right direction.
Thanks,
sushan
Dear Sushan, see this new post.
https://magento4u.wordpress.com/2011/03/28/add-extra-fields-in-registration-page/
Hope it will helpful for you. Thanks
Dear Moinul ,
love to read your blog. I am especially interessted in what your wrote about
magento and webservices:
http://magento4u.wordpress.com/2009/07/28/magento-api-web-service-work/
Do you have any experience using magento acl’s by implementing a REST-Service? Perhaps this would be a possible idea for a new blog post
All the best.
Mario
Thanks Mario, for your nice info. I will try
Hi,
Thanks for this blog for magento programing helps & make easy our tasks.
I have one problem regarding magento.
I have requirement of add one link on customer dashboard and make it as a new block like i want to show register customer can add your ads or somthing like other things..
Please someone help me for that my task..
Thanks
Harishwebs
Salam,
I am trying to setup multi stores using plesk and subdomains but I’m keep getting this error:
app/Mage.php was not found.
I have tried few tutorials but no luck. I’ve been following your blog for a while now and was thinking if you have any simple tutorial in place to setup multi stores.
Thanks…
Hi, I need to write a module something like Advanced Permissions, where we can assign the permissions to multiple users for multiple stores so that a particular user can see only the respective store. Where can I find the tutorial for this task?
Thanks…
Assalamu’alaikum..
Moinul Islam Al-Mmaun, Can you help me for this job? Please contact me at: admin at tokocamfrog dot com. There are some things I want to discuss with you about this job.
Thanks & Regards,
Erwin
Let me know how can I help you. My email is moinulkuet@gmail.com
I tried your module code and its works best. But I want to know that how I get any object in “helloworld.phtml” like product,category etc….
Cheers!!!
Hi, just wanted to say great blog – keep up the good work.