Spurtcommerce
DocumentAPI ReferenceAdd-ons
Addons
Addons
  • catalogue related addons
    • Payment gateway Add-on
    • Product Variant Addon
    • Product Attribute Add-on
    • Question and Answer Add-on
    • Common Product Add-on
    • Ratings and Review Add-on
    • Product QR Add-on
    • Assign Product Price Add-on
  • CMS RELATED ADDONS
    • SEO and Blogs Add-on
  • SALES Related Add-ons
    • Abandoned Cart Add-on
  • MARKETING RELATED ADDONS
    • Related Products Add-on
    • Promotion Widget
    • Coupon Add-on
  • B2B RELATED ADDONS
    • Quotation Request Add-on
    • Chat Add-on
    • Supplier Mangement Add-on
  • Support Ticket Addon
Powered by GitBook
On this page
  • Frontend Setup - Seller Panel:
  • Store Setup
  1. catalogue related addons

Assign Product Price Add-on

About Addon

The SpurtCommerce Assign Product Price Add-on enables both store administrators and sellers to set and manage custom prices for products in the store. This plugin provides enhanced flexibility in pricing, allowing both admins and vendors to assign specific prices, discounts, and promotional offers, making it easier to cater to diverse customer needs and seasonal promotions.

Features:

  • Custom Price Assignment: Admins and sellers can set unique prices for each product directly within their respective panels.

  • Discount & Promotion Management: Easily apply discounts or promotional prices on selected products to drive sales.

  • Flexible Price Updates: Quickly adjust prices based on stock levels, market trends, or demand changes.

  • Segmented Pricing for Targeted Offers: Configure special prices tailored to different customer groups or campaigns, boosting engagement.

Frontend Setup - Seller Panel:

Follow these steps to set up the front end for the Assign Product Price addon in Spurtcommerce Seller Panel.

Step 1: Install the Addon:

Locate the Spurtcommerce addon package, typically named seller.addOns.zip.

Extract the zip file and copy the assign-product-price folder into the addOns folder in your project.

projectFolder -> addOns

After this step, the structure should look like:

projectFolder -> addOns -> assign-product-price

Once completed, proceed to update the configuration.

Step 2: Update the Configuration

After installing the addon, update the add-ons.constant.ts file to include the necessary plugins:

// ----------------------Assign product price--------------------------
import * as AssignProductPrice from './assign-product-price/assign-product-price.constant'
// components paths
export const AssignComponents = AssignProductPrice.componentLists;
// route paths
export const AssingRoutes = AssignProductPrice.routePath;

If you wish to uninstall or remove the Rating and Review addon, replace the component paths and route paths with an empty array.

// ----------------------Assign product price--------------------------
import * as AssignProductPrice from './assign-product-price/assign-product-price.constant'
// components paths
export const AssignComponents = [];
// route paths
export const AssingRoutes = [];

Step 3: Run the Application:

To run the application with the integrated Rating and Review addon, use the following command:

$ npm run large-serve

After executing this command, the addon will be available on Spurtcommerce on the designated page.

Step 4: Build the Application

Finally, to prepare the application for deployment, run the build command:

$ npm run large-build

The latest build files will then be ready to deploy to the server.

Store Setup

Follow these steps to set up the personalized pricing module on the front-end Next.js web store.

Setup Overview:

  • Install the extension

  • Update configuration

  • Integrate the module

  • Run the application

  • Build the application

Step 1: Install the Extension

Locate the Spurtcommerce addon package, typically named addOns.zip.

Extract the zip file and copy the PriceGroup folder into the addOns folder in your project.

projectFolder -> addOns

After this step, the structure should look like:

projectFolder -> addOns -> PriceGroup

Once completed, proceed to update the configuration.

Step 2: Update the Configuration

After installing the extension, update the configuration in Spurtcommerce’s addonsconfig.js as follows:

  1. Import the required line into addonsconfig.js.

import ProductPriceGroup from './PriceGroup/ProductPriceGroup'
  1. Add the ProductPriceGroup plugin to the specified object.

        export const AddonsComponent = {                                                                                                                                   ProductPriceGroup,                                                                                                                     }  

Step 3: Module Details

The ProductPriceGroup module includes the following components that you can utilize in any page within Spurtcommerce by sending the required Product data as props:

  • ProductPriceGroup Component

{ConnectPlugin.ProductPriceGroup &&                        <ConnectPlugin.ProductPriceGroup skuId={productDetail?.skuId} />}

Note: Use the ProductPriceGroup component by passing the product data as a prop:

        <ConnectPlugin.ProductPriceGroup skuId={productDetail?.skuId} />

Step 4: Run the Application

Once you have integrated the Personalized pricing module, run the application using:

$ npm run dev

This command will launch Spurtcommerce with the integrated Personalized pricing module visible on the specified page.

Step 5: Build the Application

To prepare the application for deployment, execute the following command:

$ npm run build

or

$ yarn run build                                                                                                                             

The latest build files will then be ready for server deployment.

PersonalisedPrice Add-On

Follow these below steps are installing PersonalisedPrice addon

App setup

These are the steps that need to be followed to do the front end store setup.

· Installing an extension

· Update the configuration

· Module Detail

· Run the Application

· Make the build

Step 1 : Installing an extension

These are the steps that need to be executed for installation of the extension.

Locate the Spurtcommerce addon package, typically named addons.zip.

Extract the zip file and copy the PersonalisedPrice folder into the addons folder in your project.

projectFolder->lib->module->add-ons

After this step, the structure should look like:

projectFolder->lib->module->add-ons->PersonalisedPrice

Once completed, proceed to update the configuration.

Step 2 : Update the configuration

After extracting the add on zip file for changing the configurations in addons.dart, you have to follow the steps below:

Go to

projectFolder->lib->module->add-ons->addonsshared.dart

Then inside addonsShared array paste the following content

{"PersonalisedPrice": SpurtPersonalisedPrice(), "data": ""},

After placing the above files it will look like this,

List addonsShared = [

{"PersonalisedPrice": SpurtPersonalisedPrice(), "data": ""},

];

Then give the following imports

import 'package:spurtcommerce/module/add-ons/PersonalisedPrice/pages/personalisedprice.dart';

Or

There will be a popup for quick fix

Step 3 : Module details

After executing the above mentioned steps, we have to place these below lines in the module folder to show the PersonalisedPrice to the user.

Payment

Once you finished updating the configuration then in the projectFolder->lib->module->Tab->My-cart->pages->checkout.dart

Use this line for view the PersonalisedPrice

findMyClass(

'PersonalisedPrice', {

"taxvalue": detail

.details['taxValue'],

"taxtype":

detail.details['taxType'],

"flag":

detail.details['flag'],

"discount": detail

.details['discount'],

"detailsku":

detail.details['skuId'],

"pricerefer": detail

.details['pricerefer'],

}

),

After insert the line restart your application

Step 4 : Run the application

After integrating the PersonalisedPrice Module into Spurt Commerce, you can use the following commands to run the application in terminal.

$ flutter run

Or

In Run menu select run without debugging

In case if throws any exception

$ flutter run –no-sound-null-safety

Once you execute the above command you can view the installed module in Spurt Commerce, within the page in which you have integrated

Step 5 : Make the build

In order to build, you need to run the following commands. In order to check the application, run the following commands and build the application.

$flutter build

If you want to split the abi then

$flutter build –split-per-abi

For bundle build

$flutter build appbundle

PreviousProduct QR Add-onNextSEO and Blogs Add-on

Last updated 7 months ago