Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
f74f78c
Testing (#434)
WojciechPlodzien Oct 27, 2025
c4b4e40
fix: restore config files required to build (#436)
rigbyms Oct 27, 2025
a8f7e06
fix: onboarding table missing (#447)
rigbyms Oct 29, 2025
e6b4ee6
chore: deleted incorrect relation info request
itariv Oct 30, 2025
4607091
Merge pull request #454 from mercurjs/MM2-1435-b-2-c-storefront-added…
itariv Oct 30, 2025
ac0f642
chore: revert of backend changes for aloglia indexes products info
itariv Oct 31, 2025
241bdab
Merge pull request #457 from mercurjs/revert_MM2-1277-vendor-issue-wi…
itariv Oct 31, 2025
2786f03
Merge branch 'main' into testing
rigbyms Nov 3, 2025
500cc54
update changelog (#459)
mikolvj Nov 3, 2025
67db5ef
update version to 1.4.2
mikolvj Nov 3, 2025
d204b59
chore: fixed reviews for store (#449)
itariv Nov 3, 2025
50ac38e
chore: added possibility to remove location from product on vendor pa…
itariv Nov 3, 2025
e8caf79
chore: changed default sorting of orders for vendor panel (#444)
itariv Nov 3, 2025
f10324d
Clear build command for testing
appsessive-tech Nov 12, 2025
5f89903
Merge pull request #485 from mercurjs/clear-build-command-testing
appsessive-tech Nov 12, 2025
232fa3c
MM2-1403
milosz-w-rigby Nov 13, 2025
19e1d85
base
milosz-w-rigby Nov 13, 2025
c1ad037
Merge branch 'fix/mm2-1458' of github.com:mercurjs/mercur into MM2-14…
milosz-w-rigby Nov 13, 2025
354b6cb
MM2-1403
milosz-w-rigby Nov 13, 2025
bc97489
Merge branch 'MM2-1403-b-2-c-vendor-panel-sorting-and-searching-throw…
milosz-w-rigby Nov 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 51 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,54 @@ All notable changes to Mercur will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.4.2] - 2025-11-03

### Release 1.4.2 - B2C Marketplace

### Changed

- **Improved add-to-cart load time on Storefront** (@AlanJanicki)

### Fixed

#### Vendor Panel

- **Vendors can now see the correct list of products (Issue [#173])** (@katPanek, @AlanJanicki)
- **Vendors can now see the current product price during price list creation** (@AlanJanicki)
- **Vendors can now see correct order item prices on the order details page** (@AlanJanicki)
- **Vendors can now edit shipping options without issues** (@katPanek, @AlanJanicki)
- **Vendors can now edit product attributes without issues (Issue [#380])** (@itariv, @AlanJanicki)
- **Vendors can now edit additional product attributes without issues** (@kilias07)
- **Vendors can now manage inventory item locations without issues** (@AlanJanicki)
- **Fixed UI issue with suspended account** (@AlanJanicki)
- **Fixed price lists table item status** (@katPanek)
- **Fixed product variant edit drawer** (@katPanek)

#### Admin Panel

- **Admin can now manage refund reasons without issues (Issue [#440])** (@mikolvj)
- **Fixed UI issue in the seller edition drawer** (@sylwia-werner)
- **Fixed sellers table pagination** (@sylwia-werner)
- **Fixed user invitation email issues** (@jakub-borek)

#### Storefront

- **Storefront listings now display new products without issues** (@itariv)
- **Fixed UI issue on the review details page** (@AlanJanicki)
- **Fixed UI issue with the product reviews section** (@AlanJanicki)
- **Fixed cart first step saving issues** (@AlanJanicki)
- **Fixed product carousel on the product details page** (@AlanJanicki)

#### Other

- **Fixed link targets in the order confirmation email template** (@itariv, @AlanJanicki)

## [1.4.1] - 2025-10-29

### Fixed

- **Fixed incorrect migration script (Issue [#439])**

## [1.4.0] - 2025-10-27

### Release 1.4.0 - B2C Marketplace
Expand Down Expand Up @@ -32,7 +80,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **Fixed errors on message page in Admin Panel** (@AlanJanicki)
- **Fixed screen swiping issues in product detail page specific section** (@Si3r4dz)


## [1.3.0] 2025-10-15

### Release 1.3.0 - B2C Marketplace
Expand All @@ -43,8 +90,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **Cleaner separation between Medusa core and Mercur extensions**
- **Easier updates and maintenance through modular architecture**
- **Independent versioning for different components
Details: divide Mercur into plugins by @rigbyms in https://github.com/mercurjs/mercur/pull/410
Read more in our [docs page](https://docs.mercurjs.com/components/backend).**
Details: divide Mercur into plugins by @rigbyms in https://github.com/mercurjs/mercur/pull/410
Read more in our [docs page](https://docs.mercurjs.com/components/backend).**

### Enhanced CLI tooling:

Expand All @@ -54,8 +101,8 @@ Read more in our [docs page](https://docs.mercurjs.com/components/backend).**
- **Simplified configuration process**

### Others:
- **Fix: Link tax regions to system tax provider by @NicolasGorga in https://github.com/mercurjs/mercur/pull/405**

- **Fix: Link tax regions to system tax provider by @NicolasGorga in https://github.com/mercurjs/mercur/pull/405**

## [1.1.0] - 2025-09-19

Expand Down
3 changes: 2 additions & 1 deletion apps/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"medusa"
],
"scripts": {
"build": "medusa build && ln -s .medusa/server/public/ public",
"build": "medusa build",
"build:symlink": "medusa build && ln -s .medusa/server/public/ public",
"build:windows": "medusa build && node -e \"const fs=require('fs');const path=require('path');const target='.medusa/server/public/';const link='public';try{if(fs.existsSync(link))fs.rmSync(link,{recursive:true,force:true});fs.symlinkSync(target,link,process.platform==='win32'?'junction':'dir');console.log('✔ Symlink created:',link,'→',target);}catch(e){console.error('✖ Failed to create symlink:',e.message);process.exit(1);}\"",
"seed": "medusa exec ./src/scripts/seed.ts",
"start": "medusa start --types=false",
Expand Down
34 changes: 34 additions & 0 deletions apps/backend/src/scripts/fixes/fix-onboarding-291025.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { ExecArgs } from '@medusajs/framework/types'
import { ContainerRegistrationKeys } from '@medusajs/framework/utils'

/**
* IMPORTANT: Use this script only if you are affected by the issue described below.
*
*
* This script fixes the "onboarding" table from "payout" module, which may be accidentally dropped by a migration.
* The table may be missing, if the database was set up using affected Mercur versions: 1.3.0, 1.4.0
*
* Place this script in your backend project's src/scripts/fixes directory, and run it with:
* ```
* npx medusa exec ./src/scripts/fixes/fix-onboarding-291025.ts
* ```
*/

export default async function fixOnboardingTable291025({
container
}: ExecArgs) {
const pg = container.resolve(ContainerRegistrationKeys.PG_CONNECTION)

await pg.raw(
`create table if not exists "onboarding" ("id" text not null, "data" jsonb null, "context" jsonb null, "payout_account_id" text not null, "created_at" timestamptz not null default now(), "updated_at" timestamptz not null default now(), "deleted_at" timestamptz null, constraint "onboarding_pkey" primary key ("id"));`
)
await pg.raw(
`CREATE UNIQUE INDEX IF NOT EXISTS "IDX_onboarding_payout_account_id_unique" ON "onboarding" (payout_account_id) WHERE deleted_at IS NULL;`
)
await pg.raw(
`CREATE INDEX IF NOT EXISTS "IDX_onboarding_deleted_at" ON "onboarding" (deleted_at) WHERE deleted_at IS NULL;`
)
await pg.raw(
`alter table if exists "onboarding" add constraint "onboarding_payout_account_id_foreign" foreign key ("payout_account_id") references "payout_account" ("id") on update cascade;`
)
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "mercur",
"version": "1.3.0",
"version": "1.4.2",
"devDependencies": {
"turbo": "^2.3.3"
},
Expand All @@ -23,4 +23,4 @@
"codegen": "cd .",
"generate:oas": "turbo run generate:oas"
}
}
}
2 changes: 1 addition & 1 deletion packages/framework/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@
"@mikro-orm/postgresql": "6.4.3",
"awilix": "^8.0.1"
}
}
}
34 changes: 0 additions & 34 deletions packages/framework/src/types/algolia/algolia-product.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,38 +120,4 @@ export const AlgoliaVariantValidator = z.object({
amount: z.number(),
})
),
calculated_price: z
.object({
id: z.string(),
is_calculated_price_price_list: z.boolean(),
is_calculated_price_tax_inclusive: z.boolean(),
calculated_amount: z.number(),
raw_calculated_amount: z.object({
value: z.string(),
precision: z.number(),
}),
is_original_price_price_list: z.boolean(),
is_original_price_tax_inclusive: z.boolean(),
original_amount: z.number(),
raw_original_amount: z.object({
value: z.string(),
precision: z.number(),
}),
currency_code: z.string(),
calculated_price: z.object({
id: z.string(),
price_list_id: z.string().nullish(),
price_list_type: z.string().nullish(),
min_quantity: z.number().nullish(),
max_quantity: z.number().nullish(),
}),
original_price: z.object({
id: z.string(),
price_list_id: z.string().nullish(),
price_list_type: z.string().nullish(),
min_quantity: z.number().nullish(),
max_quantity: z.number().nullish(),
}),
})
.nullish(),
});
4 changes: 2 additions & 2 deletions packages/modules/algolia/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mercurjs/algolia",
"version": "1.4.0",
"version": "1.4.2",
"author": "MercurJS <[email protected]> (https://mercurjs.com)",
"repository": {
"type": "git",
Expand Down Expand Up @@ -86,4 +86,4 @@
"dependencies": {
"algoliasearch": "^5.40.0"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,6 @@ export async function findAndTransformAlgoliaProducts(
'variants.options.*',
'variants.options.prices.*',
'variants.prices.*',
'variants.calculated_price.*',
'brand.name',
'options.*',
'options.values.*',
'images.*',
Expand All @@ -143,13 +141,6 @@ export async function findAndTransformAlgoliaProducts(
'attribute_values.attribute.is_filterable',
'attribute_values.attribute.ui_component'
],
context: {
variants: {
calculated_price: QueryContext({
currency_code: region?.currency_code ?? 'eur'
})
}
},
filters: ids.length
? {
id: ids,
Expand Down
4 changes: 2 additions & 2 deletions packages/modules/b2c-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mercurjs/b2c-core",
"version": "1.4.0",
"version": "1.4.2",
"author": "MercurJS <[email protected]> (https://mercurjs.com)",
"repository": {
"type": "git",
Expand Down Expand Up @@ -84,4 +84,4 @@
"node": ">=20"
},
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
}
68 changes: 46 additions & 22 deletions packages/modules/b2c-core/src/api/vendor/campaigns/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ import {
AuthenticatedMedusaRequest,
MedusaResponse,
} from "@medusajs/framework";
import { ContainerRegistrationKeys } from "@medusajs/framework/utils";

import sellerCampaign from "../../../links/seller-campaign";
import { fetchSellerByAuthActorId } from "../../../shared/infra/http/utils";
import { ContainerRegistrationKeys, omitDeep } from "@medusajs/framework/utils";
import { fetchSellerByAuthActorId } from "@mercurjs/framework";
import { createVendorCampaignWorkflow } from "../../../workflows/campaigns/workflows";
import { VendorCreateCampaignType } from "./validators";

Expand All @@ -16,6 +14,12 @@ import { VendorCreateCampaignType } from "./validators";
* description: "Retrieves a list of campaigns for the authenticated vendor."
* x-authenticated: true
* parameters:
* - name: q
* in: query
* schema:
* type: string
* required: false
* description: Search query to filter campaigns by name (case-insensitive).
* - name: offset
* in: query
* schema:
Expand Down Expand Up @@ -67,28 +71,47 @@ export const GET = async (
) => {
const query = req.scope.resolve(ContainerRegistrationKeys.QUERY);

const { data: relations, metadata } = await query.graph({
entity: sellerCampaign.entryPoint,
fields: req.queryConfig.fields.map((field) => `campaign.${field}`),
filters: {
...req.filterableFields,
deleted_at: {
$eq: null,
},
const filters: Record<string, any> = {
...omitDeep(req.filterableFields, ['q', 'seller_id']),
deleted_at: {
$eq: null,
},
pagination: req.queryConfig.pagination,
});
}

if(req.filterableFields?.seller_id) {
filters.seller = {
id: req.filterableFields.seller_id,
}
}

if(req.filterableFields?.q) {
filters.$or = [
{
name: {
$ilike: `%${req.filterableFields.q}%`,
},
},
{
campaign_identifier: {
$ilike: `%${req.filterableFields.q}%`,
},
},
]
}

const activeCampaigns = relations
.map((relation) => relation.campaign)
.filter((campaign) => !!campaign);
const { data: relations, metadata } = await query.index({
entity: 'campaign',
fields: [...req.queryConfig.fields, 'seller.id'],
filters,
pagination: req.queryConfig.pagination,
})

res.json({
campaigns: activeCampaigns,
count: activeCampaigns.length,
offset: metadata?.skip,
limit: metadata?.take,
});
campaigns: relations,
count: relations.length,
offset: metadata?.skip ?? 0,
limit: metadata?.take ?? relations.length,
})
};

/**
Expand Down Expand Up @@ -152,3 +175,4 @@ export const POST = async (

res.status(201).json({ campaign });
};

10 changes: 8 additions & 2 deletions packages/modules/b2c-core/src/api/vendor/campaigns/validators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,19 @@ import { z } from 'zod'
import { CampaignBudgetType, isPresent } from '@medusajs/framework/utils'
import { createFindParams } from '@medusajs/medusa/api/utils/validators'

export const VendorGetCampaignsParamsFields = z.object({
q: z.string().optional()
})

export type VendorGetCampaignsParamsType = z.infer<
typeof VendorGetCampaignsParams
>
export const VendorGetCampaignsParams = createFindParams({
offset: 0,
limit: 50
limit: 50,
offset: 0
})
.merge(VendorGetCampaignsParamsFields)
.strict()

/**
* @schema VendorCreateCampaignBudget
Expand Down
Loading