{"id":295,"date":"2015-10-13T18:00:13","date_gmt":"2015-10-13T18:00:13","guid":{"rendered":"http:\/\/angelwings.net\/blog\/?p=295"},"modified":"2015-10-13T18:00:13","modified_gmt":"2015-10-13T18:00:13","slug":"prestashop-additional-field-in-product-attributes","status":"publish","type":"post","link":"https:\/\/angelwings.net\/blog\/prestashop-additional-field-in-product-attributes\/","title":{"rendered":"Prestashop: Additional field in product attributes"},"content":{"rendered":"<p>Added an additional field for product attributes<\/p>\n<p>Files updated and added to override folder<\/p>\n<p>override\/classes<br \/>\nAttribute.php<br \/>\nline 36 \u00a0\u00a0 public $barcode;<br \/>\nline 50 \u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0 &#8216;barcode&#8217; =&gt; \u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0array(&#8216;type&#8217; =&gt; self::TYPE_STRING, &#8216;validate&#8217; =&gt; &#8216;isAnything&#8217;, &#8216;size&#8217; =&gt; 3),<\/p>\n<p>override\/controllers\/admin<br \/>\nAdminAttributesGroupsController.php<br \/>\nline 128<br \/>\n&#8216;barcode&#8217; =&gt; array(<br \/>\n&#8216;title&#8217; =&gt; $this-&gt;l(&#8216;Barcode&#8217;),<br \/>\n&#8216;align&#8217; =&gt; &#8216;center&#8217;,<br \/>\n&#8216;class&#8217; =&gt; &#8216;fixed-width-xs&#8217;<br \/>\n)<br \/>\nline 277<br \/>\narray(<br \/>\n&#8216;type&#8217; =&gt; &#8216;text&#8217;,<br \/>\n&#8216;label&#8217; =&gt; $this-&gt;l(&#8216;Barcode&#8217;),<br \/>\n&#8216;name&#8217; =&gt; &#8216;barcode&#8217;,<br \/>\n&#8216;hint&#8217; =&gt; $this-&gt;l(&#8216;Invalid characters:&#8217;).&#8217; &lt;&gt;;=#{}&#8217;<br \/>\n)<\/p>\n<p>Database insert column<br \/>\n# \u00a0\u00a0 \u00a0Name \u00a0\u00a0 \u00a0Type \u00a0\u00a0 \u00a0Collation \u00a0\u00a0 \u00a0Attributes \u00a0\u00a0 \u00a0Null \u00a0\u00a0 \u00a0Default<br \/>\n5 \u00a0\u00a0 \u00a0barcode \u00a0\u00a0 \u00a0varchar(3) \u00a0\u00a0 \u00a0utf8_unicode_ci \u00a0\u00a0 &#8211; \u00a0\u00a0\u00a0 Yes \u00a0\u00a0 \u00a0NULL<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Added an additional field for product attributes Files updated and added to override folder override\/classes Attribute.php line 36 \u00a0\u00a0 public $barcode; line 50 \u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0 &#8216;barcode&#8217; =&gt; \u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0array(&#8216;type&#8217; =&gt; self::TYPE_STRING, &#8216;validate&#8217; =&gt; &#8216;isAnything&#8217;, &#8216;size&#8217; =&gt; 3), override\/controllers\/admin AdminAttributesGroupsController.php line 128 &#8216;barcode&#8217; =&gt; array( &#8216;title&#8217; =&gt; $this-&gt;l(&#8216;Barcode&#8217;), &#8216;align&#8217; =&gt; &#8216;center&#8217;, &#8216;class&#8217; =&gt; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,9],"tags":[105],"class_list":["post-295","post","type-post","status-publish","format-standard","hentry","category-database","category-ecommerce","tag-prestashop-1-6"],"_links":{"self":[{"href":"https:\/\/angelwings.net\/blog\/wp-json\/wp\/v2\/posts\/295","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/angelwings.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/angelwings.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/angelwings.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/angelwings.net\/blog\/wp-json\/wp\/v2\/comments?post=295"}],"version-history":[{"count":0,"href":"https:\/\/angelwings.net\/blog\/wp-json\/wp\/v2\/posts\/295\/revisions"}],"wp:attachment":[{"href":"https:\/\/angelwings.net\/blog\/wp-json\/wp\/v2\/media?parent=295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/angelwings.net\/blog\/wp-json\/wp\/v2\/categories?post=295"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/angelwings.net\/blog\/wp-json\/wp\/v2\/tags?post=295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}