Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import functionality broken, storeId 0 instead of storeId 1, etc.. #541

Open
1 of 4 tasks
alex-pommier opened this issue Mar 4, 2025 · 1 comment
Open
1 of 4 tasks

Comments

@alex-pommier
Copy link

Sponsorship

If this request requires additional support (e.g., such as direct email/phone/meeting/development), I have the following interest in helping to sponsor the effot via GitHub Sponsors:

  • None, please continute to work for me for free :P
  • Absolutely, I get value out of this!
  • Maybe later
  • I'm already a sponsor... Woot!

Describe the bug

A clear and concise description of what the bug is.

Software Versions

  • DNN: 09.13.07
  • Hotcakes: 03.09.01

To Reproduce

Steps to reproduce the behavior:

  1. Go to 'HCC Backend > Catalog > Products > Import from Excel '
  2. Choose File > Load File
  3. Run the import
  4. Check SQL Table: hcc_Product in column StoreId, you'll see 0 instead of 1, assuming this is on a DNN installation with 1 portal (Portal 0) and a fresh HCC install.

Expected behavior

When an import takes place, the products should be added to the correct StoreId (1 in my scenario) as per the hcc_Stores table definition.

Actual behavior

When importing, because products are being added to StoreId 0, the linkages in the excel for categories, product images & product types are breaking because products are not correctly set to StoreId 1 where all my data was added via the HCC interface. So import does not work and fails on all the above linkages and even the products post import don't show up because they're set to StoreId 0.

Additional context

I believe that the errors in product image retrieval, category linkages & NULL Product Types all stem from the importer incorrectly settings or not properly retrieving the correct StoreId to be used for import. I also tried manually updating all my products StoreId value from 0 to 1, as 1 is the StoreId in SQL & then re-running an import with the (Update Existing Products) set to true but it still failed linked the associated Categories, Images, Product Type & Product Type Properties.

@alex-pommier
Copy link
Author

alex-pommier commented Mar 4, 2025

Digging through Products_Import.aspx.cs I found this:

// added import path so version 2.xx knows where import images are stored
    catImport.ImagesImportPath = string.Format("~/Portals/{0}/Hotcakes/Data/import/", conf.DnnPortalSettings.PortalId);

Granted, that's for the images but not sure if it's pulling the portal ID as the store ID where store ID definition is actually 1, the 0 variant I believe stores the default "Sample" products in HCC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant