Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
denotes questions related to the customers module
1
vote
error to add custom attributes
Mage::getSingleton('eav/config')
->getAttribute('customer', 'demande')
->setData('used_in_forms', array('adminhtml_customer', 'customer_account_create', 'customer_account_edit', 'checkout_register … compare it with a older backup
To remove attribute the correct way
/* @var $installer Mage_Eav_Model_Entity_Setup */
$installer->startSetup();\
// Remove Product Attribute
$installer->removeAttribute('customer …
0
votes
Accepted
Customer user group admin magento
Then use a various observer to filter the collection related to customer and orders. If this admin user has limited ACL access then you may not need to implement all of the event listed below. … (){
$collection = $observer->getCollection();
if (strpos(get_class($collection),'Customer_Collection')){
//logic for getting customer group
//only show customer …
1
vote
How To Calculate Customer Lifetime Value
A better way to accomplish what you are trying to do would be
//get any third party information you need
//customer = $app->getCustomer();
require_once('app/Mage.php'); //Path to Magento
umask(0);
Mage … orderCollection as $_order)
{
}
See
Magento: Grab/Display Customer's Lifetime Sales Stats and Total Amount of Orders on Order View Pages
Run Magento Code Externally
How to get order list for logged in customer …
0
votes
Accepted
Show price with customer group vat on product page
bool $includingTax return price include tax flag
* @param null|Mage_Customer_Model_Address $shippingAddress
* @param null|Mage_Customer_Model_Address $billingAddress
* @param null|int $ctc customer …
1
vote
Check if customer attribute already exists
$new_name = $postData['display_name'];
// if updating NOT a new customer
if($customer instanceof Mage_Customer_Model_Customer && !$customer->isObjectNew() && ! … empty($new_name)) {
// duplicate check
$customer_check = Mage::getModel('customer/customer')
->getCollection()
->addAttributeToSelect('display_name') …
3
votes
Accepted
In the database, what is the relationship between the customer_entity table and sales?
See sales_flat_order.customer_id
Since customer can check out as guest, then customer_id is either null for quest or contain the customer id for register member …
1
vote
Accepted
Programmatically setting a customers website id
Instead of using setStore() you could have use setStoreId()
$customer = Mage::getModel('customer/customer');
$email = '[email protected]';
$storeId = 1;
$website_id = Mage::getModel('core/store')->load … ($storeId)->getWebsiteId();
$customer->setWebsiteId($website_id);
$customer->setStoreId($storeId);
... …
1
vote
Accepted
Amasty Extension - Sales Reps and Dealers - Custom Attributes
Take a look at table am_perm
perm_id | uid | cid
Where:
'uid' = magento admin id
'cid' = customer id. … To look up dealer by order id
Mage::getModel('amperm/perm')->getUserByOrder($orderId);
Mage::helper('amperm')->getCurrentSalesPersonId()
To lookup a dealer by customer Id
$perm = Mage::getModel('amperm …
1
vote
Getting name from billing address
$this->getOrderId() return order increment id
$order = Mage::getModel('sales/order')->loadByIncrementId($this->getOrderId());
$custname = $order->getBillingAddress()->getName();
To load by order id …
3
votes
Accepted
Get order by id and customers that made the order
Try
<?php
require_once('app/Mage.php'); //Path to Magento
umask(0);
Mage::app();
$productId = 297;
$orders = Mage::getModel('sales/order')->getCollection();
$orders
->getSelect()
->jo …
0
votes
Accepted
magento reset password email via php code
To send a rest link by email
$email='[email protected]';
$customer = Mage::getModel('customer/customer')
->setWebsiteId(Mage::app()->getStore()->getWebsiteId())
-> … loadByEmail($email);
$customer->sendPasswordResetConfirmationEmail(); …
0
votes
Customer grid new column display when sorting
prepareColumns();
//see http://stackoverflow.com/questions/8941460/magento-grid-column-position
}
protected function _prepareCollection()
{
$collection = Mage::getResourceModel('customer …
9
votes
Accepted
Associate a guest checkout with an account if their email matches and existing account
By default when a customer check out as a register user magento will store the customer info and link the customer to existing order using:
Table : sales_flat_order
- customer_id : numeric … /customer");
$customer->setWebsiteId($websiteId);
$customer->loadByEmail($email);
//if email found
if($customer->getId()){
$order->setCustomerId …
7
votes
Accepted
Redirection to Admin Customer Edit (with key) from a frontend controller
processed without secret key validation
*
* @var array
*/
protected $_publicActions = array('redirecttocustomer');
public function redirecttocustomerAction()
{
// get the customer … id pass by your observer (url key)
Mage::app()->getResponse()->setRedirect(Mage::helper("adminhtml")->getUrl("adminhtml/customer/edit/", array("id"=>$customer_id)));
In your observer
Mage …
1
vote
Catch and verify custom parameters at registration
You could try either
Rewrite Mage_Customer_AccountController see Overriding Frontend Core Controllers
or
Create an observer for customer_save_before
Then do your validation see Magento custo …