If you just are going to do this export/import only once, you should look into nopCommerce built in feature for importing from an excel doc. If you need more advanced import; nopAdmin has a very good tool for importing products, including variants, attributes, specifications etc.
I'm trying to develop a plugin where I "import" products from an external store, these products are not insterted in nopCommerce´s database due to the big quantity of products that I need to import.
I can show external products in homepage but i'm having so many problems trying to add an external product to Cart and continue with payment process.
Is nopCommerce the right tool for what I need to do? Can nopCommerce work as I describe above?
Many thanks i really appreciate your help , ok now another thing i have MS SQL database which has a table of categories and Products, i want to fetch it from that DB and insert into nopCommerce DB, how can i achieve this?
My Controller look like this now.
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Web.Mvc; using Nop.Admin.Models.Catalog; using Nop.Core.Domain.Catalog; using Nop.Core.Infrastructure; using Nop.Plugin.Misc.ProductImport.Models; using Nop.Services.Catalog;
namespace Nop.Plugin.Misc.Product.Controllers { class ProductImportController : Controller { // // GET: /Default1/ public void CreateProduct() { //product service var _productService = new NopEngine().Resolve<IProductService>();
// category service var _categoryService = new NopEngine().Resolve<ICategoryService>();
//declare product instance Core.Domain.Catalog.Product prod = new Core.Domain.Catalog.Product() { Name = "DELL 4530", UpdatedOnUtc = DateTime.UtcNow, CreatedOnUtc = DateTime.UtcNow, };
//add product via product service _productService.InsertProduct(prod);
//create category instance Category _category = new Category() { Name = "Laptops" };