Magento的SKU大小 [英] Size SKU in Magento

查看:66
本文介绍了Magento的SKU大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于所有产品,我如何允许SKU超过34个字符(对于简单产品)?

How can I allow SKU be longer than 34 characters (for simple products) for all products?

当我添加新产品(简单)并输入超过34个字符时,Magento保存后将其剪切为34.

When i add new product(simple) and enter more than 34 characters, Magento cuts it to 34 after saving.

在数据库中,来自eav_attribute表的'sku'属性(用于quete物料,订单物料,发票物料,装运物料)保存varchar(255).对于Catalog_Product_Entity,属性为VarChar(64).无论哪种情况,它都超过34个字符.这样,我可以将SKU更改为64个字符,而无需在数据库中进行任何更改,对吗?

In the database the 'sku' attributes ( for quete item,order item,invoice item, shipment item) from eav_attribute table hold varchar(255). For Catalog_Product_Entity the attributed is VarChar(64). In either case, it is more than 34characters. Thus, I could change SKU to 64 characters without making any change in database, correct?

我该怎么做?我对用户端magento代码有很好的了解,但对管理员方面却没有.您能为我推荐一个关于在管理端进行更改的好教程,以帮助我自己解决这个问题.

How do i do that? I have good understanding of the user side magento code, but not Admin side. Can you suggest me good tutorial on making changes in Admin side that could help me figure this question myself.

谢谢你,玛格斯

推荐答案

@latvian提议作为解决方案的这种修改不是一个好主意,因为它破坏了与核心安装的兼容性,并且可能会在Windows中创建意外行为.未来升级的核心.这种快速而肮脏的解决问题的方式只会在将来制造问题.

@latvian The kind of modification that you propose as a solution is not a very good idea as it breaks compatibility with the core installation and it may create unpredicted behaviour in the future when upgrading the core. This quick and dirty way of solving problems will only create problems in the future.

我建议为产品对象添加一个名为 custom_sku 的自定义属性,该属性可以是字符串,并且可以根据需要设置它.这是关于如何在安装中添加自定义属性的链接.

What I recommend is adding a custom attribute to the product object called custom_sku that can be a string and you can make it as long as you want. Here is a link on how to add a custom attribute to your installation.

这篇关于Magento的SKU大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆