{"id":468202,"date":"2024-10-18T08:05:16","date_gmt":"2024-10-18T08:05:16","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=468202"},"modified":"2026-02-23T06:23:10","modified_gmt":"2026-02-23T06:23:10","slug":"odoo-category-page-using-reactjs","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/odoo-category-page-using-reactjs\/","title":{"rendered":"How to build Odoo category page using ReactJS"},"content":{"rendered":"\n<p>Building an Odoo category page using React.js involves creating an <a href=\"https:\/\/store.webkul.com\/odoo-headless-e-commerce.html\" target=\"_blank\" rel=\"noreferrer noopener\">Odoo headless eCommerce<\/a> solution that communicates with Odoo&#8217;s backend, typically via its Odoo REST API.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p><a href=\"https:\/\/webkul.com\/odoo-headless-development\/\">Odoo Headless development<\/a> is a system that splits the frontend and backend of an Odoo e-commerce site, boosting its efficiency, speed, and user-friendliness<\/p>\n\n\n\n<p>This separation improves scalability by using the strengths of each part, leading to a better and more enjoyable user experience.<\/p>\n\n\n\n<p>Webkul <a href=\"https:\/\/webkul.com\/blog\/user-manual-of-odoo-rest-api\/\" target=\"_blank\" rel=\"noreferrer noopener\">Odoo REST API<\/a> offers a varient of API endpoints that allow you to perform different actions like&nbsp;<strong>\u2018products\u2019<\/strong>,&nbsp;<strong>\u2018category-list\u2019,<\/strong>&nbsp;and&nbsp;<strong>\u2018cart\u2019<\/strong>&nbsp;but we\u2019ll work with the&nbsp;<strong>\u2018category-list\u2019<\/strong>&nbsp;endpoint.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Getting Start<\/h2>\n\n\n\n<p>We will guide you through this blog step-by-step that how to build a category page using\u00a0<a href=\"https:\/\/store.webkul.com\/Odoo-REST-API.html\" target=\"_blank\" rel=\"noreferrer noopener\">Odoo REST API<\/a>.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><a href=\"#tailwind-css\">Install Tailwind CSS<\/a><\/li>\n\n\n\n<li><a href=\"#react-router\">Setup React Router<\/a><\/li>\n\n\n\n<li><a href=\"#odoo-api\">Configuring Odoo API<\/a><\/li>\n\n\n\n<li><a href=\"#category-page-component\">Building the Category Page Component<\/a><\/li>\n\n\n\n<li><a href=\"#category-page\">Integrating the Component<\/a><\/li>\n\n\n\n<li><a href=\"#react-app\">Running Your Application<\/a><\/li>\n<\/ol>\n\n\n\n<p><strong>Assumption:<\/strong>\u00a0We\u2019re familiar with Create React App,\u00a0and you have set up the React Application.<\/p>\n\n\n\n<p><strong>Note:<\/strong>&nbsp;We will set up the project with the name \u201c<strong>odoo-category-page.<\/strong>\u201c<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"tailwind-css\">Step 1:&nbsp;<strong><strong>Install Tailwind CSS<\/strong><\/strong><\/h2>\n\n\n\n<p>You need to implement Tailwind CSS\u00a0for effective page UI design.<\/p>\n\n\n\n<p>1. <strong>Install the tailwind CSS via npm<\/strong>: This command installs the tailwind CSS and Dev depencies. Run the following command:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">npm install -D tailwindcss postcss autoprefixer<\/pre>\n\n\n\n<p>2. <strong>Initialize Tailwind CSS<\/strong>: This command creates a configuration file for Tailwind CSS.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">npx tailwindcss init -p<\/pre>\n\n\n\n<p>3. <strong>Configure Tailwind<\/strong> <strong>CSS<\/strong>: Open<strong> <\/strong>the<strong> <code>tailwind.config.js<\/code> <\/strong>file and Replace the content with the following configuration to set the purge paths for your files:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">\/** @type {import(&#039;tailwindcss&#039;).Config} *\/\nmodule.exports = {\n  content: &#091;\n    &quot;.\/src\/**\/*.{js,jsx,ts,tsx}&quot;, \/\/ Adjust if needed\n  ],\n  theme: {\n    extend: {\n       colors: {\n          primary: &quot;#35979C&quot;,\n      },\n    },\n  },\n  plugins: &#091;],\n}<\/pre>\n\n\n\n<p>4. <strong>Import Tailwind CSS<\/strong>: In the src directory, open the\u00a0<strong>index.css<\/strong>\u00a0file and add the following lines to import Tailwind\u2019s\u00a0<strong>base<\/strong>,\u00a0<strong>components<\/strong>, and\u00a0<strong>utilities<\/strong>\u00a0styles.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">@tailwind base;\n@tailwind components;\n@tailwind utilities;<\/pre>\n\n\n\n<p>Over all setup the project, and you can see the final folder structure.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">.\n\u251c\u2500\u2500 src\/\n\u2502   \u251c\u2500\u2500 App.js\n\u2502   \u251c\u2500\u2500 App.css\n\u2502   \u251c\u2500\u2500 App.test.js\n|   \u251c\u2500\u2500 index.js\n|   \u251c\u2500\u2500 index.css\n\u2502   \u2514\u2500\u2500 logo.svg\n\u251c\u2500\u2500 public\/\n\u2502   \u251c\u2500\u2500 index.html\n\u2502   \u251c\u2500\u2500 logo.svg\n\u2502   \u251c\u2500\u2500 robots.txt\n\u2502   \u2514\u2500\u2500 manifest.json\n\u251c\u2500\u2500 package-lock.json\n\u251c\u2500\u2500 package.json\n\u251c\u2500\u2500 tailwind.config.js\n\u2514\u2500\u2500 README.md<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"react-router\">Step 2: Set up the React Router<\/h2>\n\n\n\n<p>React Router is used to define multiple routes in the application, so you need to install the React Router library.<\/p>\n\n\n\n<p>1. <strong>Install the React Router<\/strong>: Run the following command in your project directory.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">npm install react-router-dom<\/pre>\n\n\n\n<p>2. <strong>Mount React Router<\/strong>: Open&nbsp;<code><strong>App.js<\/strong><\/code>&nbsp;File and replace the code to import&nbsp;<strong>BrowserRouter<\/strong>,&nbsp;<code><strong>Route<\/strong><\/code>, and&nbsp;<code><strong>Routes<\/strong><\/code>&nbsp;for displaying the router component.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">import &quot;.\/App.css&quot;;\nimport { BrowserRouter, Route, Routes } from &quot;react-router-dom&quot;;\nimport Layout from &quot;.\/pages\/Layout&quot;;\n\nfunction App() {\n  return (\n    &lt;&gt;\n      &lt;BrowserRouter&gt;\n        &lt;Routes&gt;\n          &lt;Route path=&quot;\/&quot; element={&lt;Layout \/&gt;}&gt;\n            &lt;Route index element={&lt;h1&gt; Render home page &lt;\/h1&gt;} \/&gt;\n          &lt;\/Route&gt;\n        &lt;\/Routes&gt;\n      &lt;\/BrowserRouter&gt;\n    &lt;\/&gt;\n  );\n}\n\nexport default App;<\/pre>\n\n\n\n<p>After this, you can create the layout for the category page and other pages like\u00a0the <a href=\"https:\/\/webkul.com\/blog\/create-odoo-cart-page-using-reactjs\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Odoo<\/strong> <strong>cart<\/strong><\/a>\u00a0and\u00a0<a href=\"https:\/\/webkul.com\/blog\/create-odoo-product-using-reactjs\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Odoo<\/strong> <strong>product page<\/strong><\/a>.<\/p>\n\n\n\n<p>We\u2019ll start by creating a file named&nbsp;<code>Layout.js<\/code>&nbsp;in the&nbsp;<code>src\/pages<\/code>&nbsp;folder.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">import { Outlet } from &quot;react-router-dom&quot;;\nimport Header from &quot;..\/components\/Header&quot;;\nimport Footer from &quot;..\/components\/Footer&quot;;\n\nconst Layout = () =&gt; {\n  return (\n    &lt;&gt;\n      {\/* You can add the Header Here *\/}\n      &lt;Header \/&gt;\n      &lt;div className=&quot;container max-w-&#091;74%] mx-auto min-h-&#091;60vh]&quot;&gt;\n        &lt;Outlet \/&gt;\n      &lt;\/div&gt;\n      {\/* You can add the Footer Here *\/}\n      &lt;Footer \/&gt;\n    &lt;\/&gt;\n  );\n};\n\nexport default Layout;<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"odoo-api\">Step 3: Configuring Odoo API<\/h2>\n\n\n\n<p>1. <strong>Odoo Setup<\/strong>: Ensure you have access to your Odoo instance and the API authentication token.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">const ODOO_URL = &quot;Odoo_API_URL&quot;;\nconst Authenticate = &quot;AUTH_TOKEN&quot;;<\/pre>\n\n\n\n<p>2. <strong>Create an API Helper<\/strong>: Create a file named <code>index.js<\/code> to handle API requests in the src\/fetcher directory.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">const ODOO_URL = &quot;Odoo_API_URL&quot;;\nconst Authenticate = &quot;AUTH_TOKEN&quot;;\n\nconst callOdooApi = async ({ query, method = &quot;GET&quot;, variables }) =&gt; {\n  try {\n    const response = await fetch(`${ODOO_URL}\/${query}`, {\n      method: method,\n      headers: {\n        &quot;Content-Type&quot;: &quot;application\/json&quot;,\n        Authenticate: Authenticate,\n      },\n      bosy: JSON.stringify({\n        ...(variables &amp;&amp; variables),\n      }),\n    });\n    const body = await response.json();\n\n    if (body.errors) {\n      throw body.errors&#091;0];\n    }\n    return {\n      status: response.status,\n      body,\n    };\n  } catch (e) {\n    console.log(e);\n  }\n};\n\nexport const fetchCategories = async () =&gt; {\n  const res = await callOdooApi({\n    query: &quot;category-list&quot;,\n    method: &quot;POST&quot;,\n  });\n\n  const result = res.body;\n  return { result };\n};\n\nexport const getCollectionProducts = async (category) =&gt; {\n  const handle = {\n    filter: { category_url: { eq: category } },\n    search: &quot;&quot;,\n    pageSize: 12,\n    currentPage: 1,\n  };\n\n  const res = await callOdooApi({\n    query: &quot;product-list&quot;,\n    method: &quot;POST&quot;,\n    variables: {\n      ...handle,\n    },\n  });\n  const result = res.body;\n\n  return { result };\n};<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"category-page-component\">Step 4: Building the Category Page Component<\/h2>\n\n\n\n<p>1. <strong>Create a Category Component<\/strong>: Create a new file <code>Category.js<\/code> in the src\/pages\/shop\/category.js<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">import { useEffect, useState } from &quot;react&quot;;\nimport { Link, useParams } from &quot;react-router-dom&quot;;\nimport { fetchCategories, getCollectionProducts } from &quot;..\/..\/..\/fetcher&quot;;\n\nconst Category = () =&gt; {\n  const { categorySlug } = useParams();\n  const &#091;products, setProducts] = useState(&#091;]);\n  const &#091;categories, setCategories] = useState(&#091;]);\n\n  useEffect(() =&gt; {\n    const fetchProducts = async () =&gt; {\n      const { result: categories } = await fetchCategories();\n      setCategories(categories);\n      const { result } = await getCollectionProducts(categorySlug);\n      setProducts(result);\n    };\n    fetchProducts();\n  }, &#091;categorySlug]);\n\n  const itemList = products?.products;\n  const aggregations = products?.aggregations;\n  const categoryList = categories?.category;\n\n  return (\n    &lt;div class=&quot;min-h-screen mt-20  flex&quot;&gt;\n      &lt;div className=&quot;min-w-&#091;20%] p-4 bg-white border-r&quot;&gt;\n        {Array.isArray(aggregations) &amp;&amp;\n          aggregations?.map((aggregation, index) =&gt;\n            aggregation?.attribute_code !== &quot;price&quot; ? (\n              &lt;div key={index}&gt;\n                &lt;h3 class=&quot;text-lg font-semibold mb-2&quot;&gt;{aggregation?.label}&lt;\/h3&gt;\n                &lt;div class=&quot;mb-4&quot;&gt;\n                  {Array.isArray(aggregation?.options) &amp;&amp;\n                    aggregation?.options?.map((option, ind) =&gt; (\n                      &lt;div class=&quot;flex items-center&quot; key={ind}&gt;\n                        &lt;input\n                          type=&quot;checkbox&quot;\n                          value={option.value}\n                          id={option?.label}\n                          class=&quot;mr-2&quot;\n                        \/&gt;\n                        &lt;label for={option?.label}&gt;{option?.label}&lt;\/label&gt;\n                      &lt;\/div&gt;\n                    ))}\n                &lt;\/div&gt;\n              &lt;\/div&gt;\n            ) : (\n              &lt;div className=&quot;mb-2&quot;&gt;\n                &lt;h3 class=&quot;text-lg font-semibold mb-2&quot;&gt;{aggregation?.label}&lt;\/h3&gt;\n                &lt;div class=&quot;flex flex-col justify-between items-center&quot;&gt;\n                  &lt;div class=&quot;flex w-full justify-between&quot;&gt;\n                    &lt;span&gt;${aggregation?.options?.min_price}&lt;\/span&gt;\n                    &lt;span&gt;${aggregation?.options?.max_price}&lt;\/span&gt;\n                  &lt;\/div&gt;\n                  &lt;input\n                    type=&quot;range&quot;\n                    min={aggregation?.options?.min_price}\n                    max={aggregation?.options?.max_price}\n                    class=&quot;w-full mt-2 text-primary bg-primary&quot;\n                  \/&gt;\n                &lt;\/div&gt;\n              &lt;\/div&gt;\n            )\n          )}\n      &lt;\/div&gt;\n\n      &lt;div class=&quot;p-6 max-w-&#091;80%]&quot;&gt;\n        &lt;div class=&quot;flex justify-between items-center mb-4&quot;&gt;\n          &lt;div&gt;\n            &lt;span class=&quot;text-sm text-gray-500&quot;&gt;\n              Products \/ Default Category \/ Collections\n            &lt;\/span&gt;\n          &lt;\/div&gt;\n          &lt;div class=&quot;flex items-center&quot;&gt;\n            &lt;input\n              type=&quot;text&quot;\n              placeholder=&quot;Search...&quot;\n              class=&quot;border rounded px-2 py-1 mr-4&quot;\n            \/&gt;\n            &lt;select class=&quot;border bg-gray-100 rounded px-2 py-1 mr-4&quot;&gt;\n              &lt;option&gt;Public Pricelist&lt;\/option&gt;\n            &lt;\/select&gt;\n            &lt;select class=&quot;border rounded px-2 bg-gray-100 py-1&quot;&gt;\n              &lt;option&gt;Sort By: Featured&lt;\/option&gt;\n              &lt;option&gt;Price: Low to High&lt;\/option&gt;\n              &lt;option&gt;Price: High to Low&lt;\/option&gt;\n            &lt;\/select&gt;\n          &lt;\/div&gt;\n        &lt;\/div&gt;\n        &lt;div class=&quot;flex mb-6 overflow-x-scroll py-3 space-x-2&quot;&gt;\n          {Array.isArray(categoryList) &amp;&amp;\n            categoryList?.map((cat, index) =&gt; (\n              &lt;Link\n                to={`\/shop\/category\/${cat.url_key}`}\n                key={index}\n                class=&quot;bg-gray-100 text-sm px-4 py-2 rounded&quot;\n              &gt;\n                {cat?.name}\n              &lt;\/Link&gt;\n            ))}\n        &lt;\/div&gt;\n\n        &lt;div class=&quot;grid grid-cols-4 gap-4&quot;&gt;\n          {itemList?.items &amp;&amp;\n            Array.isArray(itemList?.items) &amp;&amp;\n            itemList?.items?.map((product, index) =&gt; (\n              &lt;div key={index} class=&quot;bg-white p-4 rounded shadow&quot;&gt;\n                &lt;img\n                  src={product?.thumbnail?.name}\n                  alt={product?.name}\n                  class=&quot;mb-4 w-fit h-60&quot;\n                \/&gt;\n                &lt;h4 class=&quot;font-semibold text-lg mb-2&quot;&gt;{product?.name}&lt;\/h4&gt;\n                &lt;p class=&quot;text-green-600 font-bold&quot;&gt;\n                  ${product?.price_range.minimum_price?.regular_price?.value}\n                &lt;\/p&gt;\n              &lt;\/div&gt;\n            ))}\n        &lt;\/div&gt;\n      &lt;\/div&gt;\n    &lt;\/div&gt;\n  );\n};\n\nexport default Category;<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"category-page\">Step 5: Integrating the Component<\/h2>\n\n\n\n<p>1. <strong>Update App.js<\/strong>: Import and render the <code>Category<\/code>.js component in your <code>App.js<\/code>.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">import &quot;.\/App.css&quot;;\nimport { BrowserRouter, Route, Routes } from &quot;react-router-dom&quot;;\nimport Layout from &quot;.\/pages\/Layout&quot;;\nimport NoPage from &quot;.\/pages\/NoPage&quot;;\nimport Category from &quot;.\/pages\/Shop\/Category&quot;;\n\nfunction App() {\n  return (\n    &lt;BrowserRouter&gt;\n      &lt;Routes&gt;\n        &lt;Route path=&quot;\/&quot; element={&lt;Layout \/&gt;}&gt;\n          &lt;Route index element={&lt;h1&gt; Render home page &lt;\/h1&gt;} \/&gt;\n          &lt;Route path=&quot;shop\/category\/:categorySlug&quot; element={&lt;Category \/&gt;} \/&gt;\n          &lt;Route path=&quot;*&quot; element={&lt;NoPage \/&gt;} \/&gt;\n        &lt;\/Route&gt;\n      &lt;\/Routes&gt;\n    &lt;\/BrowserRouter&gt;\n  );\n}\n\nexport default App;<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"react-app\">Step 6: Running Your Application<\/h2>\n\n\n\n<p>1. <strong>Start the Development Server<\/strong>: Run the following command to start your React app.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">npm run start<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"976\" height=\"440\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2024\/10\/prompt.webp\" alt=\"Terminal view for starrt react js server\" class=\"wp-image-468399\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2024\/10\/prompt.webp 976w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2024\/10\/prompt-300x135.webp 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2024\/10\/prompt-250x113.webp 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2024\/10\/prompt-768x346.webp 768w\" sizes=\"(max-width: 976px) 100vw, 976px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>2. <strong>View in Browser<\/strong>: Open your browser and navigate to <code>http:\/\/localhost:3000\/shop\/category\/desks-1<\/code> to see your category page in action.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"632\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2024\/10\/fina-1200x632.webp\" alt=\"Final Output of the category page using react js\" class=\"wp-image-468503\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2024\/10\/fina-1200x632.webp 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2024\/10\/fina-300x158.webp 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2024\/10\/fina-250x132.webp 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2024\/10\/fina-768x405.webp 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2024\/10\/fina-1536x810.webp 1536w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2024\/10\/fina.webp 1831w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p><strong>Conclusion<\/strong><\/p>\n\n\n\n<p>You\u2019ve successfully built a category page using React.js that fetches data from Odoo! This approach can be further enhanced with features like sorting and filtering to improve the user experience.<\/p>\n\n\n\n<p>We will require the Webkul\u00a0<a href=\"https:\/\/store.webkul.com\/Odoo-REST-API.html\" target=\"_blank\" rel=\"noreferrer noopener\">Odoo REST APIs<\/a>\u00a0for\u00a0<a href=\"https:\/\/webkul.com\/headless-commerce-development-services\/\" target=\"_blank\" rel=\"noreferrer noopener\">headless development services<\/a>\u00a0with Webkul, and you can also check out our Open Source\u00a0<a href=\"https:\/\/github.com\/webkul\/odoo-react-nextjs-commerce\" target=\"_blank\" rel=\"noreferrer noopener\">Odoo React headless eCommerce<\/a>\u00a0Application.<\/p>\n\n\n\n<p>Webkul, an official Odoo partner and <a href=\"https:\/\/webkul.com\/odoo-development\/\" target=\"_blank\" rel=\"noreferrer noopener\">Odoo development company<\/a>, provides a wide range of development services, including SaaS solutions, data migrations, mobile app development, and more.<\/p>\n\n\n\n<p>Thanks for reading this blog.<\/p>\n\n\n\n<p>Happy Coding!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Building an Odoo category page using React.js involves creating an Odoo headless eCommerce solution that communicates with Odoo&#8217;s backend, typically via its Odoo REST API. Introduction Odoo Headless development is a system that splits the frontend and backend of an Odoo e-commerce site, boosting its efficiency, speed, and user-friendliness This separation improves scalability by using <a href=\"https:\/\/webkul.com\/blog\/odoo-category-page-using-reactjs\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":545,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2032,13575,2007,6357],"tags":[9224,14744,15269,1267,9272,6360],"class_list":["post-468202","post","type-post","status-publish","format-standard","hentry","category-e-commerce-2","category-next-js","category-odoo","category-react-js","tag-headless-ecommerce","tag-next-headless-theme","tag-next-js-2","tag-odoo","tag-odoo-website","tag-react-ecommerce"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to build Odoo category page using ReactJS - Webkul Blog<\/title>\n<meta name=\"description\" content=\"Building an Odoo category page using React.js involves creating a headless eCommerce solution that communicates with Odoo&#039;s backend, typically via its Odoo REST API.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/odoo-category-page-using-reactjs\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to build Odoo category page using ReactJS - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"Building an Odoo category page using React.js involves creating a headless eCommerce solution that communicates with Odoo&#039;s backend, typically via its Odoo REST API.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/odoo-category-page-using-reactjs\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2024-10-18T08:05:16+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-23T06:23:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2024\/10\/prompt.webp\" \/>\n<meta name=\"author\" content=\"Abhishek Kumar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Abhishek Kumar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/odoo-category-page-using-reactjs\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/odoo-category-page-using-reactjs\/\"},\"author\":{\"name\":\"Abhishek Kumar\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/9df44e99abf7df96a2c30b30fe20a4b9\"},\"headline\":\"How to build Odoo category page using ReactJS\",\"datePublished\":\"2024-10-18T08:05:16+00:00\",\"dateModified\":\"2026-02-23T06:23:10+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/odoo-category-page-using-reactjs\/\"},\"wordCount\":590,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/odoo-category-page-using-reactjs\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2024\/10\/prompt.webp\",\"keywords\":[\"headless ecommerce\",\"next headless theme\",\"next js\",\"odoo\",\"Odoo website\",\"react ecommerce\"],\"articleSection\":[\"E-commerce\",\"next js\",\"Odoo\",\"react js\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/odoo-category-page-using-reactjs\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/odoo-category-page-using-reactjs\/\",\"url\":\"https:\/\/webkul.com\/blog\/odoo-category-page-using-reactjs\/\",\"name\":\"How to build Odoo category page using ReactJS - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/odoo-category-page-using-reactjs\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/odoo-category-page-using-reactjs\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2024\/10\/prompt.webp\",\"datePublished\":\"2024-10-18T08:05:16+00:00\",\"dateModified\":\"2026-02-23T06:23:10+00:00\",\"description\":\"Building an Odoo category page using React.js involves creating a headless eCommerce solution that communicates with Odoo's backend, typically via its Odoo REST API.\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/odoo-category-page-using-reactjs\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/odoo-category-page-using-reactjs\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/odoo-category-page-using-reactjs\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2024\/10\/prompt.webp\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2024\/10\/prompt.webp\",\"width\":976,\"height\":440},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/odoo-category-page-using-reactjs\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to build Odoo category page using ReactJS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/9df44e99abf7df96a2c30b30fe20a4b9\",\"name\":\"Abhishek Kumar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5dab3b6807a6aa05fa5ad733392108c9f4ca765e4051f2e20687e10133f461e5?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5dab3b6807a6aa05fa5ad733392108c9f4ca765e4051f2e20687e10133f461e5?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Abhishek Kumar\"},\"description\":\"Abhishek Kumar, a skilled software engineer, specializes in crafting immersive digital experiences. With a focus on frontend development, he excels in creating headless themes . Proficient in JavaScript and next.js, Abhishek's expertise adds a unique and dynamic dimension to any project, ensuring a seamless and engaging user journey.\",\"url\":\"https:\/\/webkul.com\/blog\/author\/abhishekkumar-mg121\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to build Odoo category page using ReactJS - Webkul Blog","description":"Building an Odoo category page using React.js involves creating a headless eCommerce solution that communicates with Odoo's backend, typically via its Odoo REST API.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webkul.com\/blog\/odoo-category-page-using-reactjs\/","og_locale":"en_US","og_type":"article","og_title":"How to build Odoo category page using ReactJS - Webkul Blog","og_description":"Building an Odoo category page using React.js involves creating a headless eCommerce solution that communicates with Odoo's backend, typically via its Odoo REST API.","og_url":"https:\/\/webkul.com\/blog\/odoo-category-page-using-reactjs\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2024-10-18T08:05:16+00:00","article_modified_time":"2026-02-23T06:23:10+00:00","og_image":[{"url":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2024\/10\/prompt.webp","type":"","width":"","height":""}],"author":"Abhishek Kumar","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Abhishek Kumar","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/odoo-category-page-using-reactjs\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/odoo-category-page-using-reactjs\/"},"author":{"name":"Abhishek Kumar","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/9df44e99abf7df96a2c30b30fe20a4b9"},"headline":"How to build Odoo category page using ReactJS","datePublished":"2024-10-18T08:05:16+00:00","dateModified":"2026-02-23T06:23:10+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/odoo-category-page-using-reactjs\/"},"wordCount":590,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/odoo-category-page-using-reactjs\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2024\/10\/prompt.webp","keywords":["headless ecommerce","next headless theme","next js","odoo","Odoo website","react ecommerce"],"articleSection":["E-commerce","next js","Odoo","react js"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/odoo-category-page-using-reactjs\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/odoo-category-page-using-reactjs\/","url":"https:\/\/webkul.com\/blog\/odoo-category-page-using-reactjs\/","name":"How to build Odoo category page using ReactJS - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/odoo-category-page-using-reactjs\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/odoo-category-page-using-reactjs\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2024\/10\/prompt.webp","datePublished":"2024-10-18T08:05:16+00:00","dateModified":"2026-02-23T06:23:10+00:00","description":"Building an Odoo category page using React.js involves creating a headless eCommerce solution that communicates with Odoo's backend, typically via its Odoo REST API.","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/odoo-category-page-using-reactjs\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/odoo-category-page-using-reactjs\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/odoo-category-page-using-reactjs\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2024\/10\/prompt.webp","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2024\/10\/prompt.webp","width":976,"height":440},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/odoo-category-page-using-reactjs\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to build Odoo category page using ReactJS"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/9df44e99abf7df96a2c30b30fe20a4b9","name":"Abhishek Kumar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5dab3b6807a6aa05fa5ad733392108c9f4ca765e4051f2e20687e10133f461e5?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5dab3b6807a6aa05fa5ad733392108c9f4ca765e4051f2e20687e10133f461e5?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Abhishek Kumar"},"description":"Abhishek Kumar, a skilled software engineer, specializes in crafting immersive digital experiences. With a focus on frontend development, he excels in creating headless themes . Proficient in JavaScript and next.js, Abhishek's expertise adds a unique and dynamic dimension to any project, ensuring a seamless and engaging user journey.","url":"https:\/\/webkul.com\/blog\/author\/abhishekkumar-mg121\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/468202","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/545"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=468202"}],"version-history":[{"count":52,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/468202\/revisions"}],"predecessor-version":[{"id":517329,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/468202\/revisions\/517329"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=468202"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=468202"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=468202"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}