How could I alter the product name attribute so it's text instead of varchar? Is there a way of doing this through Magento?
I'm currently migrating an old database and the product names are much longer than varchar can fit.
Thanks!
I'm not a Magento expert yet, but out of a common knowledge of E-Commerce systems, I'm not sure this is a good idea. The product name is being used in numerous places around the system (e.g. in reports; in confirmation E-Mails ....) that would all have to be checked for limitations and breaking layouts.
Would it not be conceivable to either
Put the long name into a description field that already is of the type TEXT, and put a cut-off version into the name field
Put the long name into a description field, and alter any needed layouts so that description field is shown in place of the product name?
Related
I have customers from many countries, and for each one I need to generate a page with data on it.
In my report I have a similar query: SELECT Name, Address, CodLanguage ... FROM Customers
For each record of this query, I want to generate a page in Jasper Reports with customer data in their respective language (I know its language through this flag CodLanguage).
I want change report language for each customer page (each record). Can i do this using report parameter locale? Or changing some variable for each record? Has anyone had a similar situation? Have any idea what can be done?
Example
I need translate the labels: Name, Address, City, Phone Number and Country in 10 different languages, according to the customer's country language.
This example is only a simplification. I will generate between 3 and 6 report pages for each customer, with many other data.
Thanks!
As far as I can tell, this is not possible using any of the standard resource references:
$R{resource.bundle.property}
msg() function
str() function
For each record, supply the corresponding locale (or determine it based on other data, like the country and city -- chances are Quebec, Canada would be French [fr_CA] while Toronto, Canada would be English [en_CA]).
Once there's a map of locales to locations, use a ResourceBundle (or MessageFormat?) to translate the key for a particular label.
Create a number of resource bundle files with translations for the various labels. The file names must have a suffix that corresponds to the predetermined locale (e.g., Bundle_fr_CA.properties).
Change the label from static text to an expression. The expression instantiates a new resource bundle to look up the key (e.g., "city.name") for its translated value, such as:
ResourceBundle.getBundle("Bundle", new Locale("en", $F{country})).getString("city.name")
How the "en" is determined will be a bit of a chore, unless you can alter the database to get the user's language preferences. This means you'll also have to create a resource bundle for every language/country combination, which can be automated.
I want to know if i created one simple product with e.g sku:YJR
then i have to create the same product as bundle product with same sku, then it create any problem in future, if not then what's the rightway ?
Any guidence is accepted.
Thanks in advance.
Firstly I would like to tell you something about : SKU
SKU StockKeeping Unit, is a unique identification code, usually alphanumeric. It allows a particular product to be tracked for inventory purposes. Typically, an SKU (pronounced with the individual letters or as SKYEW) is associated with any purchasable item in a store or catalog. You can choose any format you like for SKU but usually there is some system for choosing numbers, for example, a woman’s blouse of a particular style and size might have an SKU of “3726-8,” meaning “Style 3726, size 8.”
SKU is unique identification code.You can not create a product a with already existed SKU its not possible.
Hope this one is useful for you
I am working on an install of AspDotNetStoreFront (version 9.3.1.0). Currently, the company stores their own SKU's from their business system in the provided SKU field. They often use Manufacturer Part Number to store their vendors part number.
Example:
The above example is a variant of a product where we would like to store UPC information.
I searched the AspDotNetStoreFront manuals and could not find a recommended strategy for storing UPC codes. Its easy enough to add a field to the database and bulk import the data, however, an admin needs to be able to maintain them from within the stores user interface.
Is there a way to add a UPC field without modifying core ASPDNSF code and still allow users to maintain it from within the UI? Or do I have to use the SKU or MPN fields?
Update
I do see that there are 5 fields for "ExtensionData" that I could possibly use, but I don't see those fields as editable for Variants in the UI the way ExtensionData is for the Products themselves.
I don't think we have had customers who didn't use sku for their UPC code. In the event that you need to modify the table by adding another column, you can modify the admin to show this.
You should be ab able to edit entityEditProducts.aspx and entityEditProducts.aspx.cs to edit this in the admin area. You will just need to modify the sql scripts and the view.
I'm not sure if it's important enough for you to upgrade over, but version 9.4 added fields for UPC. From the 9.4 release notes (http://partners.vortx.com/t-summer2013releasenotes.aspx):
"Added new GTIN field to the product variant information for unique product identification. This new field holds up to 14 characters and can be used for EAN, UPC, ISBN, etc. This new field is included in WSI, Excel & XML Imports, and supported by DotFeed."
The GTIN field works for both variant and size/color.
you can use one of the 5 extension field given by default in the product table to store UPC code. By default it has also UI in edit product under Extension Data tab.
I was looking at the Flat Tables and saw this perculiar behaviour. For some of my attributes like 'language' there were two columns (language and language class) while for other 'age' there were no such values stored.
I could not find any settings in the attribute field which described this and it seems to follow no pattern.
Also in the place where language is stored language is int(11) and langauge_value is varchar(256) while in age it is varchar(256) but actually stores just a number.
UPDATE:
I think the question was not understood. I am seeing some attributes being shown as varchar(255) while some attributes being shown as attributes (int(11)) and attribute_value (varchar(255)
Found the answer:
For simple dropdown, the attribute_value is also added to the flat table.values being shown.
For Multiselect, the values are not added to the Flat table.
Pattern is very simple, when you create new attribute, you select whether it is used for search/layered navigation. If yes - indexer will add new column for this attribute to flat table.
Answered under the topic Can I add other attributes to magento's flat product catalog table? And don't get too slap-happy in adding attributes to your Flat Product Catalog table. It has a row limit defined by MySQL limitations.
I believe it is all about the scope of the variable and if it is available on the frontend of the website (where the flat table is used).
If you set an attribute to be displayed on the front end of the website (or I believe if its scope is set to store view, but dont quote me on that) it will be put into the flat table.
One way I generally look at it is, if when I create the attribute I need to reindex the flat product index, it is going to go in there.
I have a customer who retails third party batteries, and some batteries can replace several OEM models.
For instance, 3rd party SKU 12345 may replace Toshiba N23 and HP 53214, thus my customer would like to create two products with the same SKU in front end (they are essentially the same product). However, Magento by default does not allow duplicated SKU.
My current solution is to set SKU to not required from the backend, and add another attribute called Model that allows duplicated values, and display the Model in front end.
Is there a better way to do this? Or is it possible to allow duplicated SKU?
Tian Bo
Noble Technologies
It sounds to me like you've found a good solution. I'm not so sure you should try to have duplicate values for SKU for two reasons.
First the whole point of SKU is that it is a unique identifier. That's its only reason for existing. If you're going to have duplicate values, then it's not a unique identifier; it's just another attribute. But of course Magento still needs a unique identifier to work, which means that this is an extra field, which takes us exactly where you are now.
That said we come to my second point which is this... I'm not exactly a Magento guru, but I've built my share of e-commerce sites and one thing I've learned is that they depend on certain unbreakable rules to work properly. One of them is that unique identifiers are unique, both on the database and application level. As such, a large part of the website depends on this to function correctly. Which I'm pretty sure goes for Magento too.
So trying to change such a basic premise in something so complicated will only lead to horrors and a slow descent into madness.
This sounds like a good solution that I extended a bit further, however what I did with multiple store was to create a visible attribute ITEM_SKU (Item SKU) - make it visible and searchable and then concatenate the store_id to Magneto SKU to make it unique.
So SKU becomes (Store_id "-" SKU).
It surprises me how often people are willing to break who-knows-what parts of Magento, just to get a specific piece working how they expect.
The proper way to allow for duplicate skus is NOT to (unless you'd like to re-write large parts of the framework). You CAN, however, add a custom attribute to products that shares all the same settings as "sku" minus the setting that requires values to be unique.
Changing product pages, emails, etc to show this value instead will require a little extra work but will save you headaches later.
Why don't you create 1 product (SKU 12345) and list this product in multiple categories. So your multiple categories will be Toshiba and HP. The same product (SKU 12345) will be listed in Toshiba and HP.