Created
November 6, 2019 14:46
-
-
Save franMx/c441333316493065b4d41a305030d96f to your computer and use it in GitHub Desktop.
VBA script para importacion mayoristas - magento 2.3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Sub encabezadosMagento() | |
| Columns(16).EntireColumn.Delete 'link privado | |
| Columns(15).EntireColumn.Delete 'link syscom | |
| Columns(8).EntireColumn.Delete 'código fiscal | |
| Columns(5).EntireColumn.Delete 'precio especial | |
| Columns(4).EntireColumn.Delete 'precio lista | |
| 'encuentra la ultima gfila en la clumna dada: | |
| 'Find the last non-blank cell in column A(1) | |
| 'lRow = Cells(Rows.Count, 1).End(xlUp).Row | |
| For i = 2 To Cells(Rows.Count, "F").End(xlUp).Row | |
| 'concatena para catyegoria | |
| Cells(i, "L").Value = Cells(i, "I").Value & "/" & Cells(i, "J").Value & "/" & Cells(i, "K").Value | |
| 'cambia http por https | |
| Cells(i, "H").Value = Replace(Cells(i, "H").Value, "http:", "https:") | |
| 'copia columnas de imagenes. J,K,L = H | |
| Cells(i, "I").Value = Cells(i, "H").Value | |
| Cells(i, "J").Value = Cells(i, "H").Value | |
| Cells(i, "K").Value = Cells(i, "H").Value | |
| 'poner el URL en base a sku + nombre producto | |
| Cells(i, "M").Value = Cells(i, "A").Value & "-" & Cells(i, "B").Value | |
| 'los valores para que aparezcan en tienda, etc.. Empieza desde col. N hasta la col. T | |
| 'default Default simple 1 Catalog, Search 1 base | |
| Cells(i, "N").Value = "default" | |
| Cells(i, "O").Value = "Default" | |
| Cells(i, "P").Value = "simple" | |
| Cells(i, "Q").Value = 1 | |
| Cells(i, "R").Value = "Catalog, Search" | |
| Cells(i, "S").Value = 1 | |
| Cells(i, "T").Value = "base" | |
| Next i | |
| s = Array("sku", "manufacturer", "name", "price", "qty", "weight", "description", "base_image", "small_image", "thumbnail_image", "swatch_image", "categories", "url_key", "store_view_code", "attribute_set_code", "product_type", "product_online", "visibility", "is_in_stock", "product_websites") | |
| Range("A1:T1") = s | |
| End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment