Note that there are some explanatory texts on larger screens.

plurals
  1. POMagento 1.7 Add attribute to category
    text
    copied!<p>I'm trying to add to the field list of the categories a new text field called "website_url".</p> <p>I found many tutorials but none works on magento 1.7.</p> <p>I created a new module as following :</p> <p><strong>-code\local\SaponeWebConcept\CategoriesAttributes\sql\categoriesattributes_setup\mysql4-install-0.1.0.php</strong> :</p> <pre><code>&lt;?php $installer = $this; $installer-&gt;startSetup(); $installer-&gt;addAttribute('catalog_category', 'website_url', array( 'type' =&gt; 'text', 'backend' =&gt; '', 'frontend' =&gt; '', 'label' =&gt; 'Lien du site', 'input' =&gt; 'text', 'class' =&gt; '', 'source' =&gt; '', 'global' =&gt; 0, 'visible' =&gt; 1, 'required' =&gt; 0, 'user_defined' =&gt; 0, 'default' =&gt; '', 'searchable' =&gt; 0, 'filterable' =&gt; 0, 'comparable' =&gt; 0, 'visible_on_front' =&gt; 0, 'unique' =&gt; 0, 'position' =&gt; 1, )); $installer-&gt;endSetup(); </code></pre> <p><strong>-code\local\SaponeWebConcept\CategoriesAttributes\etc\config.xml</strong></p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;config&gt; &lt;modules&gt; &lt;SaponeWebConcept_CategoriesAttributes&gt; &lt;version&gt;0.1.0&lt;/version&gt; &lt;/SaponeWebConcept_CategoriesAttributes&gt; &lt;/modules&gt; &lt;global&gt; &lt;resources&gt; &lt;categoriesattributes_setup&gt; &lt;setup&gt; &lt;module&gt;SaponeWebConcept_CategoriesAttributes&lt;/module&gt; &lt;class&gt;Mage_Catalog_Model_Resource_Eav_Mysql4_Setup&lt;/class&gt; &lt;/setup&gt; &lt;connection&gt; &lt;use&gt;core_setup&lt;/use&gt; &lt;/connection&gt; &lt;/categoriesattributes_setup&gt; &lt;/resources&gt; &lt;/global&gt; &lt;/config&gt; </code></pre> <p>And my module is correctly activated by this :</p> <pre><code>&lt;SaponeWebConcept_CategoriesAttributes&gt; &lt;active&gt;true&lt;/active&gt; &lt;codePool&gt;local&lt;/codePool&gt; &lt;/SaponeWebConcept_CategoriesAttributes&gt; </code></pre> <p>But when I access my category editing, I don't see any new field. What am I doing wrong ? The module is supposed to work immediatly if the cache is off, right ? Thanks in advance.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload