HotcakesCommerce / hotcakes-commerce-core

The core of the e-commerce part of the overall solution. This is an ecommerce shopping cart solution built on top of the DNN (DotNetNuke) CMS. Anyone can do commerce online now!
https://mmmcommerce.com
MIT License
70 stars 55 forks source link

Fix setup wizard #481

Closed libanlsilva closed 11 months ago

libanlsilva commented 11 months ago

Related to Issue

After installing release 03.08.01, attempting to configure the store with default settings resulted in the following error: image

Description

To address the issue, I initially installed the latest version on a clean DNN structure and confirmed the problem's existence. Subsequently, I proceeded to debug the code to pinpoint the error.

I managed to locate the error in the CreateTabFromTemplate method within the PageUtils.cs class, specifically at line 98:

tab = TabController.DeserializeTab(tabNode, tab, portalSettings.PortalId,
     PortalTemplateModuleAction.Merge);

This method belonged to the DNN class DotNetNuke.Entities.Tabs.TabController, which couldn't be debugged or modified. Considering that the previous version of the code worked correctly, I investigated the modified files in this new version.

I identified a potential source in the change from <controlKey /> to <controlKey>View</controlKey> in the Hotcakes.dnn file. To address this, I reverted the value to <controlKey />, recompiled, and tested on a new DNN instance to ensure everything functioned correctly.

Additionally, I implemented an extra validation in the formatAmount method of the RestPaypalApi.cs file to prevent potential errors caused by null values.

These adjustments resolved the issue, ensuring the proper functioning of the system.

How Has This Been Tested?

To test the changes, I performed a new compilation of the code and installed the module in a clean DNN setup. I conducted multiple tests, and everything worked correctly.

Screenshots (if appropriate):

Types of changes

Checklist: