medusajs / nextjs-starter-medusa

A performant frontend ecommerce starter template with Next.js 14 and Medusa.
https://next.medusajs.com/
MIT License
1.78k stars 498 forks source link

nextjs-starter #384

Open Tech-dev-coder opened 1 month ago

Tech-dev-coder commented 1 month ago

Screenshot from 2024-10-24 17-15-36

product-rail not working in home page.

Tech-dev-coder commented 1 month ago

Screenshot from 2024-10-24 17-27-16 Screenshot from 2024-10-24 17-27-30

Recent orders / any order are not showing.

VariableVic commented 3 weeks ago
  1. Did you create any product collections? This component lists product collections, so for the rail to show up you need to create one first.
  2. This is a known issue with 2.0 - cart updates are not properly linked to logged in customers. We're currently working on this.
Tech-dev-coder commented 3 weeks ago

Yes, I created products in the collection, but none of them are showing.

inf-edu commented 3 weeks ago

Had the same problem. Solved it by setting pageParam to 0 in getCollectionsWithProducts from collection.ts :

const { response } = await getProductsList({
       pageParam: 0, // add this parameter
      queryParams: { collection_id: collectionIds },
      countryCode,
    })
Tech-dev-coder commented 2 weeks ago

Yes, I added it, but it doesn't make any changes. I want to display the products in the product rail on the storefront home page. medusa-storefront/src/modules/home/components/featured-products/product-rail/index.tsx

chillpilllike commented 1 week ago

Any fix for this? I am facing the same issue. Please help

chillpilllike commented 1 week ago

Had the same problem. Solved it by setting pageParam to 0 in getCollectionsWithProducts from collection.ts :

const { response } = await getProductsList({
       pageParam: 0, // add this parameter
      queryParams: { collection_id: collectionIds },
      countryCode,
    })

This fixed the issue for me, thanks

Tech-dev-coder commented 1 week ago

Had the same problem. Solved it by setting pageParam to 0 in getCollectionsWithProducts from collection.ts :

const { response } = await getProductsList({
       pageParam: 0, // add this parameter
      queryParams: { collection_id: collectionIds },
      countryCode,
    })

This fixed the issue for me, thanks is this solved issue