net3000.shoppingCart
1.0.0
dotnet add package net3000.shoppingCart --version 1.0.0
NuGet\Install-Package net3000.shoppingCart -Version 1.0.0
<PackageReference Include="net3000.shoppingCart" Version="1.0.0" />
<PackageVersion Include="net3000.shoppingCart" Version="1.0.0" />
<PackageReference Include="net3000.shoppingCart" />
paket add net3000.shoppingCart --version 1.0.0
#r "nuget: net3000.shoppingCart, 1.0.0"
#:package net3000.shoppingCart@1.0.0
#addin nuget:?package=net3000.shoppingCart&version=1.0.0
#tool nuget:?package=net3000.shoppingCart&version=1.0.0
shoppingCartCore
Overview
The shoppingCartCore library delivers e-commerce capabilities for Net3000 storefronts. It provides services for product catalog management, category metadata, order processing, payment gateways, structured data generation, social publishing, and imports. Database contexts for shopping carts and supplier data are bundled with supporting models.
Public API
<details> <summary>net3000.shoppingCart.dbContext.ct_categories</summary>
| Member | Summary | Parameters |
|---|---|---|
ct_categories ct_categories() |
Ct categories. | None |
</details>
<details> <summary>net3000.shoppingCart.dbContext.ct_orders</summary>
| Member | Summary | Parameters |
|---|---|---|
ct_orders ct_orders() |
Ct orders. | None |
</details>
<details> <summary>net3000.shoppingCart.dbContext.shoppingCartDB</summary>
| Member | Summary | Parameters |
|---|---|---|
shoppingCartDB shoppingCartDB(DbContextOptions<shoppingCartDB> options) |
Shopping Cart DB. | options (DbContextOptions<shoppingCartDB>) |
</details>
<details> <summary>net3000.shoppingCart.dbContextsuppliers.suppliersDB</summary>
| Member | Summary | Parameters |
|---|---|---|
suppliersDB suppliersDB(DbContextOptions<suppliersDB> options) |
Suppliers DB. | options (DbContextOptions<suppliersDB>) |
</details>
<details> <summary>net3000.shoppingCart.lib</summary>
| Member | Summary | Parameters |
|---|---|---|
lib lib(IConfiguration configuration) |
Lib. | configuration (IConfiguration) |
lib lib() |
Lib. | None |
Dictionary<string, string> MetaTagList(ct_products product) |
Returns a dictionary of SEO meta tags for the given product. | product (ct_products) |
Dictionary<string, string> MetaTagList(ct_categories category) |
Returns a dictionary of SEO meta tags for the given category. | category (ct_categories) |
string MetaTagListString(ct_products product) |
Returns the rendered HTML meta tag string for the given product. | product (ct_products) |
string MetaTagListString(ct_categories category) |
Returns the rendered HTML meta tag string for the given category. | category (ct_categories) |
string structuredData(ct_products product) |
Generates JSON-LD structured data for a product. | product (ct_products) |
string payPalBuyNowLink(ct_products product) |
Generates a PayPal Buy Now redirect link for the given product. | product (ct_products) |
void postProductToFacebook(ct_products product) |
Posts a product listing to the linked Facebook page. | product (ct_products) |
ct_products getProductByIDOrSKU(int? ProductID, string skuCode, string quoteString) |
Retrieves a product by ID or SKU code. | ProductID (int?), skuCode (string), quoteString (string) |
static ct_products productResponse(ct_products p) |
Returns a lightweight projection of a product for API responses. | p (ct_products) |
Task<(List<ct_products> items, int count, string listTitle)> getProductsPageAsync(int? manufacturerID, string keywords, int pageIndex, int pageSize, string sortColumn, string sortDirection) |
Returns a paged, sortable list of available products with optional manufacturer and keyword filters. | manufacturerID (int?), keywords (string), pageIndex (int), pageSize (int), sortColumn (string), sortDirection (string) |
List<product> getProductApiByCategory(int CategoryID) |
Get Product Api By Category. | CategoryID (int) |
List<product> getProductApiByCriteria(string criteria) |
Get Product Api By Criteria. | criteria (string) |
Task<List<ct_categories>> getCategories(int? myAccount, int? parentID, bool activeOnly, bool includeProducts, bool includeSubCategories) |
Get Categories. | myAccount (int?), parentID (int?), activeOnly (bool), includeProducts (bool), includeSubCategories (bool) |
Task<ct_categories> getCategory(int CategoryID, bool includeSubcategories, int pageIndex, int pageSize, string sortColumn, string sortDirection) |
Retrieves a category with paged, sorted products and optional subcategories. | CategoryID (int), includeSubcategories (bool), pageIndex (int), pageSize (int), sortColumn (string), sortDirection (string) |
Task<ct_categories> getCategoryProducts(int categoryID) |
Loads a category with its products and related data. | categoryID (int) |
Task<List<ct_relatedproducts>> getRelatedProductsWithRelatedAsync(int productId) |
Loads related-product associations including the related product entity for a given product. | productId (int) |
ct_orders getOrderByID(int orderID, string token) |
Retrieves an order by ID or security token, including items, payments, taxes, and client. | orderID (int), token (string) |
Task<List<ct_orders>> getClientOrdersByTokenAsync(int clientId, Guid token) |
Returns orders for a client matching the given security token, including items and payments. | clientId (int), token (Guid) |
Task<(int totalCount, List<ct_orders> page)> getCustomerOrdersPageAsync(int loginUserId, int pageIndex, int pageSize) |
Returns a paged list of orders for a customer, including order items and status labels. | loginUserId (int), pageIndex (int), pageSize (int) |
Task<(loginUser user, List<ct_orders> orders)> getMyAccountAsync(int loginUserId) |
Loads a login user with addresses and their order history. | loginUserId (int) |
apiResponse saveOrder(ct_orders order, bool skipCalculation) |
Persists an order, recalculates totals and taxes. | order (ct_orders), skipCalculation (bool) |
apiResponse saveOrderSimple(ct_orders order) |
Validates the cart, creates or finds the client, and saves the order. | order (ct_orders) |
ct_orders updateCart(ct_orders order) |
Recalculates cart totals, shipping, taxes, and promotions. | order (ct_orders) |
apiResponse updateCartResponse(ct_orders order) |
Recalculates the cart and returns the result wrapped in an apiResponse. | order (ct_orders) |
void ApplyChosenShippingOption(ct_orders order, int? shippingOptionId, bool adjustTotal) |
Applies a selected shipping option to the order, setting the shipping fee and optionally adjusting the total. | order (ct_orders), shippingOptionId (int?), adjustTotal (bool) |
List<shippingQuote> getCanadaPostQuotes(ct_orders ord) |
Fetches live Canada Post shipping rate quotes for the given order using stored API credentials. | ord (ct_orders) |
apiResponse chargeCreditCard(ct_orders order) |
Processes a credit card payment via the configured gateway (Stripe or Clover). | order (ct_orders) |
apiResponse quote(int id, int qty) |
Returns a price quote for a product at the given quantity, applying volume pricing. | id (int), qty (int) |
void sendOrderEmails(int orderID, string sendto, string language) |
Sends order notification and confirmation emails by order ID. | orderID (int), sendto (string), language (string) |
void sendOrderEmails(ct_orders order, string sendto, string language) |
Sends order notification and confirmation emails for the given order. | order (ct_orders), sendto (string), language (string) |
string mergeOrderData(string body, ct_orders order) |
Merges order data placeholders into an email template. | body (string), order (ct_orders) |
void updateDownloadLinks(ct_orderItems item) |
Updates download file links on an order item to use the current API URL. | item (ct_orderItems) |
Dictionary<string, int> importProducts(string filePath) |
Imports products from a CSV file, adding or updating by SKU/ID/title. | filePath (string) |
Paypal GetPaypalConfigForAccount() |
Returns the PayPal Standard configuration row for the current account, or null. | None |
StripeConnection GetStripeConfigForAccount() |
Returns the Stripe connection configuration row for the current account, or null. | None |
void AddOrderLineTotalsFromProductCatalog(order order) |
Adds each line's (price x qty) from ct_products into the order total (server-side total for Clover-style checkout). | order (order) |
Task<carolina_products> getCarolinaProductBySkuAsync(string skuCode) |
Looks up a single Carolina supplier product by SKU code. | skuCode (string) |
Task<(List<carolina_products> page, int totalCount)> getCarolinaProductsPageAsync(bool onsale, int pageIndex, int pageSize) |
Returns a paged list of Carolina supplier products, optionally filtered to on-sale items with active price overrides. | onsale (bool), pageIndex (int), pageSize (int) |
</details>
Usage Notes
- Initialise
shoppingCart.libwith configuration and supporting contexts (accounts, suppliers, etc.) before processing carts or orders. - Payment helpers such as
chargeCreditCard,payPalBuyNowLink, and email notifications depend on gateway credentials stored in the account configuration. - Use metadata helpers (
MetaTagList*,structuredData) to populate SEO and rich snippet data for storefront pages.
License
This library is proprietary to Net3000. Redistribution or use outside Net3000.ca solutions is not permitted.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.EntityFrameworkCore.SqlServer (>= 10.0.7)
- net3000.canadapost (>= 1.0.0)
- net3000.common (>= 10.0.22)
- net3000.facebook (>= 1.0.0)
- net3000.mailingList (>= 1.0.0)
- net3000.servicecoordinator (>= 1.0.0)
- net3000.twilio (>= 1.0.0)
- System.ComponentModel.Annotations (>= 5.0.0)
- System.IdentityModel.Tokens.Jwt (>= 8.17.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 0 | 7/21/2026 |
1.0.0 — Initial NuGet release. Library decoupled from netlibCore (issue #1977); depends on commonModels, ServiceCoordinator, and mailingListCore directly.