Product Name from GS128 Barcode / GTIN - barcode

I have GS128 barcode and my scanner scans the GTIN value of it. I want to get the product name from the GTIN value without referring any database. The exact requirement is in my store, I have a new product whose data is not available in the database. On scanning the product which as GS128 barcode , I want to get/retrieve the product name from the barcode. Is there any way I can get product name directly from barcode without having a look on the database.

GTIN is the Global Trade Number. So it does not directly describe the product name in a text format.
You can use that number to know the country which is in the prefix.
If you are not concerned about GTIN, you could use another barcode format, such as code 128, QR or PDF 417 and use a custom format that includes the product name in that barcode.

Related

Change report locale for each record?

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.

magento export products with custom field

I'm using dataflow - profiles to export all products.
But I need more columns from the default column mapper. I need the following columns
Entity ID
Category Name (default available is Category ID)
Additional images (default is main image only)
Furthermore, i want to prepend image URL and product URL with store URL (eg. current product URL exported is product-01.html, instead of that, I want it in http://www.example.com/product-01.html)
Appreciated with everyone helps
Search for any extensions if available. Not supported in default Magento.
Also, for images you can use three columns "image", "small_image" and "thumbnail"
Repeat these on to next record if images exceed three.

Where do you store UPC codes for products?

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.

Finding product name from UPC/EAN

Is there any way to get the product name from UPC/EAN barcode scanned from Google API?
There is no general registry of UPC product codes. You can find a list of the country codes at the beginning of the number easily, and with some legwork possibly get the national organization for a few countries that you're particularly interested in to give you a list of their secondary allocations.
But in order to get all the way down to "Banana chips, bag of 200 g, reduced trans fat formulation, Danish/Swedish/Finnish text on packaging" there's only the particular manufacturer to ask. That, or own a supermarket and register the UPC numbers of new items when you start stocking them.
Allegedly the gtin field holds the UPC/EAN code, if you restrict the search to values in that field you should only get responses where the gtin matches your barcode.
For example if you scanned your barcode and got an EAN-8 code of 05001234 then in the query string of your API call you could set
https://www.google.com/search&q=05001234&restrictBy=gtin=05001234
I have often seen multiple products returned for a single code so I guess the UPC/EAN are not globally unique or some providers have not been uploading their products under the right code.
In the response from Google are fields which hold the product title and description, you just need to parse the JSON or ATOM response.
I found another API https://market.mashape.com/mignify/gtin2product. It's pretty good. You can get products information from UPC/EAN/GTIN. It can return products description in different language.
You can use Rapid API https://rapidapi.com/search/ean. Here you get lot of API like Amazon API, Google Shopping, Barcode Lookup

Magento product name as text instead of varchar

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?

Resources