dev-master
9999999-dev https://github.com/sanjaymodasia/RedboxDigitalLinkedinClean integration of customer's new attribute called Linkedin attribute to manage linkedin profile URL
OSL-3.0
The Requires
by Redbox Digital
Wallogit.com
2017 © Pedro Peláez
Clean integration of customer's new attribute called Linkedin attribute to manage linkedin profile URL
disable compilation, (*1)
Update the following to sections in your composer file:, (*2)
"require": {
"sanjaymodasia/redboxdigitallinkedin": "dev-master"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/sanjaymodasia/RedboxDigitalLinkedin"
}
],
<config>
<modules>
<RedboxDigital_Linkedin>
<active>false</active>
<codePool>community</codePool>
</RedboxDigital_Linkedin>
</modules>
</config>
"require": {
"sanjaymodasia/redboxdigitallinkedin": "dev-master"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/sanjaymodasia/RedboxDigitalLinkedin"
}
],
<?php
error_reporting(E_ALL | E_STRICT);
$mageFilename = 'app/Mage.php';
require_once $mageFilename;
Mage::setIsDeveloperMode(true);
umask(0);
Mage::app();
Mage::app()->setCurrentStore(Mage::getModel('core/store')->load(Mage_Core_Model_App::ADMIN_STORE_ID));
$setup = new Mage_Eav_Model_Entity_Setup('core_setup');
try {
$custAttr = 'linkedin_profile'; // here enter your attribute name which you want to remove
$setup->removeAttribute('customer', $custAttr);
echo $custAttr." attribute is removed";
}
catch (Mage_Core_Exception $e) {
$this->_fault('data_invalid', $e->getMessage());
}
?>
Allow Symlinks to yes by admin => system => configuration => Developer ( under advance tab from left side ) => template settings => Allow Symlinks => yes, (*3)
if edit.phtml comes from any of your custom theme then go to that phtml file and below code, (*4)
<?php
$attributeInfo = Mage::getResourceModel('eav/entity_attribute_collection')
->setCodeFilter('linkedin_profile')
->getFirstItem();
?>
<?php if($attributeInfo): ?>
<?php $isRequired = Mage::getStoreConfig('customer/redboxdigital_linkedin/required');?>
<div class="fieldset">
<h2 class="legend"><?php echo $this->__('Additional Information') ?></h2>
<ul class="form-list">
<li class="fields">
<div class="field">
<label for="<?php echo $attributeInfo->getAttributeCode(); ?>" <?php if($isRequired):?>class="required"><em>*</em> <?php else :?>><?php endif;?><?php echo $this->__($attributeInfo->getFrontendLabel()); ?></label>
<div class="input-box">
<?php if($attributeInfo->getFrontendInput()== 'text'):?>
<input type="text" name="<?php echo $attributeInfo->getAttributeCode(); ?>" id="<?php echo $attributeInfo->getAttributeCode(); ?>" value="<?php echo $this->escapeHtml($this->getCustomer()->getLinkedinProfile()) ?>" title="<?php echo $this->__($attributeInfo->getFrontendLabel()); ?>" class="<?php if($isRequired): ?>required-entry<?php endif; ?> input-text <?php echo $attributeInfo->getfrontendClass(); ?>" />
<?php endif;?>
</div>
</div>
</li>
</ul>
</div>
<?php endif; ?>
Clean integration of customer's new attribute called Linkedin attribute to manage linkedin profile URL
OSL-3.0