{"id":27759,"date":"2022-08-16T11:25:33","date_gmt":"2022-08-16T11:25:33","guid":{"rendered":"http:\/\/create-shoppable-videos-in-blitzjs"},"modified":"2022-08-16T11:25:33","modified_gmt":"2022-08-16T11:25:33","slug":"create-shoppable-videos-in-blitzjs","status":"publish","type":"post","link":"https:\/\/cloudinary.com\/blog\/guest_post\/create-shoppable-videos-in-blitzjs\/","title":{"rendered":"Create Shoppable Videos in Blitz.js"},"content":{"rendered":"<div class=\"wp-block-cloudinary-markdown \"><p>Videos are an integral aspect of success in ecommerce, as they help drive sales and revenue. Shoppable videos is an interactive marketing tool that features products available for purchase.<\/p>\n<p>In this article, we will learn how to add videos in a Blitz app using Cloudinary\u2019s Shoppable Video and Video Player.<\/p>\n<h2>Sandbox<\/h2>\n<p>The completed project is on <a href=\"https:\/\/codesandbox.io\/s\/priceless-wood-l8k67f\">CodeSandbox<\/a>. Fork it and run the code.<\/p>\n<\/div>\n  \n  <div class=\"wp-block-cloudinary-code-sandbox \">\n    <iframe\n      src=\"https:\/\/codesandbox.io\/embed\/priceless-wood-l8k67f?theme=dark&amp;codemirror=1&amp;highlights=&amp;editorsize=50&amp;fontsize=14&amp;expanddevtools=0&amp;hidedevtools=0&amp;eslint=0&amp;forcerefresh=0&amp;hidenavigation=0&amp;initialpath=%2F&amp;module=&amp;moduleview=0&amp;previewwindow=&amp;view=&amp;runonclick=1\"\n      height=\"500\"\n      style=\"width: 100%;\"\n      title=\"priceless-wood\"\n      loading=\"lazy\"\n      allow=\"accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking\"\n      sandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"\n    ><\/iframe>\n  <\/div>\n\n  <div class=\"wp-block-cloudinary-markdown \"><p>The source code is also available on <a href=\"https:\/\/github.com\/nefejames\/blitz-shoppable-video\">GitHub<\/a>.<\/p>\n<h2>Prerequisites<\/h2>\n<p>Knowledge of React, <a href=\"https:\/\/blitzjs.com\/\">Blitz<\/a>, and a <a href=\"https:\/\/cloudinary.com\/console\">Cloudinary account<\/a> is required to get the most out of this article.<\/p>\n<h2>Getting started<\/h2>\n<p>Run any of the commands below in the terminal to install Blitz.<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php shcb-wrap-lines\">yarn <span class=\"hljs-keyword\">global<\/span> add blitz \n<span class=\"hljs-keyword\">or<\/span> \nnpm install -g blitz --legacy-peer-deps\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>Next, scaffold a new Blitz.js project with the command below:<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\">blitz <span class=\"hljs-keyword\">new<\/span> brand-visualizer\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>The command will trigger a command-line interface (CLI) where we can configure the application. The images below show the configuration options the CLI provides:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cloudinary-marketing-res.cloudinary.com\/image\/upload\/c_limit,w_2000\/f_auto\/q_auto\/media_jams\/s_C7D46584DD5FE6990E0B822B9F77AE2BD475339A021078C4F5428D0B783A17E3_1657572845379_Screenshot_45.png\" alt=\"\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"974\" height=\"277\"\/><\/p>\n<p>Next, navigate into the project directory.<\/p>\n<pre class=\"js-syntax-highlighted\"><span><code class=\"hljs shcb-wrap-lines\">cd blitz-shoppable-app\n<\/code><\/span><\/pre>\n<p>Then, run the command below to start the application at <a href=\"http:\/\/localhost:3000\">http:\/\/localhost:3000<\/a>.<\/p>\n<pre class=\"js-syntax-highlighted\"><span><code class=\"hljs shcb-wrap-lines\">blitz dev\n<\/code><\/span><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/cloudinary-marketing-res.cloudinary.com\/image\/upload\/c_limit,w_2000\/f_auto\/q_auto\/media_jams\/s_C7D46584DD5FE6990E0B822B9F77AE2BD475339A021078C4F5428D0B783A17E3_1657573264698_Screenshot+1424.png\" alt=\"\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"1600\" height=\"900\"\/><\/p>\n<h2>Creating the Shoppable Video component<\/h2>\n<p>Next, we need to create the <code>ShoppableVideo<\/code> component, which will hold the video player. Create a <code>components\/ShoppableVideo.js<\/code> file inside <code> a<\/code>pp &#8220; folder and paste the code below.<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\"><span class=\"hljs-keyword\">import<\/span> { useEffect } <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\"react\"<\/span>\n<span class=\"hljs-keyword\">import<\/span> { Cloudinary } <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\"cloudinary-core\"<\/span>\n<span class=\"hljs-keyword\">import<\/span> <span class=\"hljs-string\">\"cloudinary-video-player\/dist\/cld-video-player.min.js\"<\/span>\n<span class=\"hljs-keyword\">import<\/span> <span class=\"hljs-string\">\"cloudinary-video-player\/dist\/cld-video-player.min.css\"<\/span>\n\n<span class=\"hljs-keyword\">const<\/span> ShoppableVideo = <span class=\"hljs-function\"><span class=\"hljs-params\">()<\/span> =&gt;<\/span> {\n  <span class=\"hljs-keyword\">const<\/span> cld = <span class=\"hljs-keyword\">new<\/span> Cloudinary({ <span class=\"hljs-attr\">cloud_name<\/span>: <span class=\"hljs-string\">\"nefejames\"<\/span> })\n  useEffect(<span class=\"hljs-function\"><span class=\"hljs-params\">()<\/span> =&gt;<\/span> {\n    <span class=\"hljs-keyword\">const<\/span> videoplayer = cld\n      .videoPlayer(<span class=\"hljs-string\">\"video-player\"<\/span>, {\n        <span class=\"hljs-attr\">controls<\/span>: <span class=\"hljs-literal\">true<\/span>,\n      })\n      .width(<span class=\"hljs-number\">600<\/span>)\n    videoplayer.source(\n      <span class=\"hljs-string\">\"https:\/\/res.cloudinary.com\/nefejames\/video\/upload\/v1657587018\/Hackmamba\/house%20videos\/production_ID_4301618_gxbqe7.mp4\"<\/span>\n    )\n  }, &#91;])\n  <span class=\"hljs-keyword\">return<\/span> (\n    <span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">className<\/span>=<span class=\"hljs-string\">\"container\"<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">h1<\/span>&gt;<\/span>Blitz.js Shoppable Video<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">h1<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">video<\/span> <span class=\"hljs-attr\">controls<\/span> <span class=\"hljs-attr\">autoPlay<\/span> <span class=\"hljs-attr\">id<\/span>=<span class=\"hljs-string\">\"video-player\"<\/span>&gt;<\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">video<\/span>&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span><\/span>\n  )\n}\n<span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-keyword\">default<\/span> ShoppableVideo\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>The code above does the following:<\/p>\n<ul>\n<li>\n<p>Imports <code>useEffect<\/code> from React.<\/p>\n<\/li>\n<li>\n<p>Imports the required dependencies from <code>blitz<\/code>, <code>cloudinary-core<\/code> and <code>react<\/code>.<\/p>\n<\/li>\n<li>\n<p>Imports the video player\u2019s CSS stylesheet and JavaScript bundle.<\/p>\n<\/li>\n<li>\n<p>Creates a <code>cld<\/code> variable and sets it to a new <code>Cloudinary<\/code> instance.<\/p>\n<\/li>\n<li>\n<p>Instantiates the video player using the <code>videoPlayer<\/code> method. The method takes two parameters; the first is the ID of the video element, and the second is a configuration object.<\/p>\n<\/li>\n<li>\n<p>Set the width of the video player to 600px.<\/p>\n<\/li>\n<li>\n<p>Pass in the URL of the video we want to play to the <code>cld.source()<\/code> method.<\/p>\n<\/li>\n<\/ul>\n<h2>Integrating the Shoppable Video component<\/h2>\n<p>Having created the <code>ShoppableVideo<\/code> component, let\u2019s integrate it into the app. Update the <code>pages\/index.js<\/code> file with the code below.<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\"><span class=\"hljs-keyword\">import<\/span> { Head, dynamic } <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\"blitz\"<\/span>\n\n<span class=\"hljs-keyword\">const<\/span> DynamicShoppableVideo = dynamic(<span class=\"hljs-function\"><span class=\"hljs-params\">()<\/span> =&gt;<\/span> <span class=\"hljs-keyword\">import<\/span>(<span class=\"hljs-string\">\"app\/components\/ShoppableVideo\"<\/span>), {\n  <span class=\"hljs-attr\">ssr<\/span>: <span class=\"hljs-literal\">false<\/span>,\n})\n<span class=\"hljs-keyword\">const<\/span> Home = <span class=\"hljs-function\"><span class=\"hljs-params\">()<\/span> =&gt;<\/span> {\n  <span class=\"hljs-keyword\">return<\/span> (\n    <span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">className<\/span>=<span class=\"hljs-string\">\"container\"<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">Head<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">title<\/span>&gt;<\/span>Blitz App<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">title<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">meta<\/span> <span class=\"hljs-attr\">name<\/span>=<span class=\"hljs-string\">\"viewport\"<\/span> <span class=\"hljs-attr\">content<\/span>=<span class=\"hljs-string\">\"initial-scale=1.0, width=device-width\"<\/span> \/&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">Head<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">main<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">DynamicShoppableVideo<\/span> \/&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">main<\/span>&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span><\/span>\n  )\n}\nHome.suppressFirstRenderFlicker = <span class=\"hljs-literal\">true<\/span>\n<span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-keyword\">default<\/span> Home\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>Here, we import <code>dynamic<\/code> from Next.js and use that to dynamically import <code>ShoppableVideo<\/code> with SSR turned off. This is because the Cloudinary video player package works only on the client-side and needs the <code>window<\/code> object.<\/p>\n<p>With that, the video player renders in the browser.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cloudinary-marketing-res.cloudinary.com\/image\/upload\/c_limit,w_2000\/f_auto\/q_auto\/media_jams\/s_C7D46584DD5FE6990E0B822B9F77AE2BD475339A021078C4F5428D0B783A17E3_1659563639658_ezgif.com-gif-maker3.gif\" alt=\"\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"600\" height=\"338\"\/><\/p>\n<h2>Adding the Shoppable Video feature<\/h2>\n<p>Now, we\u2019ll add the shoppable video to the player. To do that, we need to update the <code>components\/ShoppableVideo.js<\/code> file and pass one more parameter to the <code>cld.source()<\/code> method.<\/p>\n<p>However, we first need to define the data of the product we want to display in the shoppable feature.<\/p>\n<p>Create an <code>app\/data\/index.js<\/code> file and update it with the code below.<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\"><span class=\"hljs-keyword\">const<\/span> shoppable = {\n  <span class=\"hljs-attr\">products<\/span>: &#91;\n    {\n      <span class=\"hljs-attr\">productId<\/span>: <span class=\"hljs-number\">1<\/span>,\n      <span class=\"hljs-attr\">productName<\/span>: <span class=\"hljs-string\">\"A Dog\"<\/span>,\n      <span class=\"hljs-attr\">publicId<\/span>:\n        <span class=\"hljs-string\">\"https:\/\/res.cloudinary.com\/nefejames\/image\/upload\/v1632500955\/Hackmamba\/Images\/pet9.jpg\"<\/span>,\n      <span class=\"hljs-attr\">onClick<\/span>: {\n        <span class=\"hljs-attr\">action<\/span>: <span class=\"hljs-string\">\"goto\"<\/span>,\n        <span class=\"hljs-attr\">pause<\/span>: <span class=\"hljs-literal\">true<\/span>,\n        <span class=\"hljs-attr\">args<\/span>: {\n          <span class=\"hljs-attr\">url<\/span>: <span class=\"hljs-string\">\"\/product\/1\"<\/span>,\n        },\n      },\n    },\n  ],\n}\n\n<span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-keyword\">default<\/span> shoppable\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>Let\u2019s break down the code above:<\/p>\n<ul>\n<li>\n<p>We defined and exported an object called <code>shoppable<\/code>. The <code>products<\/code> array contains the configuration for the products we want to display.<\/p>\n<\/li>\n<li>\n<p><code>productId<\/code> is the ID of the product.<\/p>\n<\/li>\n<li>\n<p><code>productName<\/code> is the name of the product.<\/p>\n<\/li>\n<li>\n<p><code>publicId<\/code> is the ID of the product image; in this case, it is the URL of the product image.<\/p>\n<\/li>\n<li>\n<p><code>onClick<\/code> defines what happens when a user clicks on a product in the products bar.<\/p>\n<\/li>\n<li>\n<p>We set the <code>action<\/code> to <code>goto<\/code>, which will open a URL in a new tab.<\/p>\n<\/li>\n<li>\n<p><code>pause<\/code> will pause the video <code>onClick<\/code>.<\/p>\n<\/li>\n<li>\n<p>We define the URL for the action in <code>args<\/code>.<\/p>\n<\/li>\n<\/ul>\n<p>Next, we\u2019ll add the <code>shoppable<\/code> object we defined to the <code>cld.source()<\/code> method. Update the <code>components\/ShoppableVideo.js<\/code> file with the code below.<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\"><span class=\"hljs-keyword\">import<\/span> { useEffect } <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\"react\"<\/span>\n<span class=\"hljs-keyword\">import<\/span> shoppable <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\"app\/data\"<\/span> <span class=\"hljs-comment\">\/\/added<\/span>\n<span class=\"hljs-keyword\">import<\/span> { Cloudinary } <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\"cloudinary-core\"<\/span>\n<span class=\"hljs-keyword\">import<\/span> <span class=\"hljs-string\">\"cloudinary-video-player\/dist\/cld-video-player.min.js\"<\/span>\n<span class=\"hljs-keyword\">import<\/span> <span class=\"hljs-string\">\"cloudinary-video-player\/dist\/cld-video-player.min.css\"<\/span>\n\n<span class=\"hljs-keyword\">const<\/span> ShoppableVideo = <span class=\"hljs-function\"><span class=\"hljs-params\">()<\/span> =&gt;<\/span> {\n  <span class=\"hljs-keyword\">const<\/span> cld = <span class=\"hljs-keyword\">new<\/span> Cloudinary({ <span class=\"hljs-attr\">cloud_name<\/span>: <span class=\"hljs-string\">\"nefejames\"<\/span> })\n  useEffect(<span class=\"hljs-function\"><span class=\"hljs-params\">()<\/span> =&gt;<\/span> {\n    <span class=\"hljs-keyword\">const<\/span> videoplayer = cld\n      .videoPlayer(<span class=\"hljs-string\">\"video-player\"<\/span>, {\n        <span class=\"hljs-attr\">controls<\/span>: <span class=\"hljs-literal\">true<\/span>,\n      })\n      .width(<span class=\"hljs-number\">600<\/span>)\n    videoplayer.source(\n      <span class=\"hljs-string\">\"https:\/\/res.cloudinary.com\/nefejames\/video\/upload\/v1657587018\/Hackmamba\/house%20videos\/production_ID_4301618_gxbqe7.mp4\"<\/span>,\n      {\n        <span class=\"hljs-attr\">shoppable<\/span>: shoppable, <span class=\"hljs-comment\">\/\/added<\/span>\n      }\n    )\n  }, &#91;])\n  \n  <span class=\"hljs-keyword\">return<\/span> (\n    <span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">className<\/span>=<span class=\"hljs-string\">\"container\"<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">h1<\/span>&gt;<\/span>Blitz.js Shoppable Video<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">h1<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">video<\/span> <span class=\"hljs-attr\">controls<\/span> <span class=\"hljs-attr\">autoPlay<\/span> <span class=\"hljs-attr\">id<\/span>=<span class=\"hljs-string\">\"video-player\"<\/span>&gt;<\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">video<\/span>&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span><\/span>\n  )\n}\n\n<span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-keyword\">default<\/span> ShoppableVideo\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>With this, the shoppable video displays on the browser.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cloudinary-marketing-res.cloudinary.com\/image\/upload\/c_limit,w_2000\/f_auto\/q_auto\/media_jams\/s_C7D46584DD5FE6990E0B822B9F77AE2BD475339A021078C4F5428D0B783A17E3_1658012986562_ezgif.com-gif-maker2.gif\" alt=\"\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"600\" height=\"338\"\/><\/p>\n<h2>Creating the product page<\/h2>\n<p>When a user clicks on a product, we want to redirect them to the product\u2019s page, where they can make a purchase. That\u2019s why we defined the <code>action<\/code> as <code>goto<\/code> in the shoppable data.<\/p>\n<p>Create a <code>pages\/product\/[id].js<\/code> file and paste the code below to make the page.<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-7\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\"><span class=\"hljs-keyword\">import<\/span> Cart <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\"app\/components\/Cart\"<\/span>\n<span class=\"hljs-keyword\">import<\/span> shoppable <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\"app\/data\"<\/span>\n<span class=\"hljs-keyword\">import<\/span> { useState } <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\"react\"<\/span>\n\n<span class=\"hljs-keyword\">const<\/span> Product = <span class=\"hljs-function\"><span class=\"hljs-params\">()<\/span> =&gt;<\/span> {\n  <span class=\"hljs-keyword\">const<\/span> &#91;cartItem, setCartItem] = useState(<span class=\"hljs-literal\">null<\/span>)\n  <span class=\"hljs-keyword\">const<\/span> addToCart = <span class=\"hljs-function\"><span class=\"hljs-params\">()<\/span> =&gt;<\/span> {\n    setCartItem({\n      <span class=\"hljs-attr\">imgUrl<\/span>: shoppable.products&#91;<span class=\"hljs-number\">0<\/span>].publicId,\n      <span class=\"hljs-attr\">name<\/span>: shoppable.products&#91;<span class=\"hljs-number\">0<\/span>].productName,\n    })\n  }\n  <span class=\"hljs-keyword\">return<\/span> (\n    <span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">className<\/span>=<span class=\"hljs-string\">\"product-container \"<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">className<\/span>=<span class=\"hljs-string\">\"product\"<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">img<\/span> <span class=\"hljs-attr\">src<\/span>=<span class=\"hljs-string\">{shoppable.products&#91;0].publicId}<\/span> <span class=\"hljs-attr\">alt<\/span>=<span class=\"hljs-string\">\"a product\"<\/span> \/&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">span<\/span>&gt;<\/span>$20:00<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">span<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">span<\/span>&gt;<\/span>{shoppable.products&#91;0].productName}<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">span<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">button<\/span> <span class=\"hljs-attr\">onClick<\/span>=<span class=\"hljs-string\">{addToCart}<\/span>&gt;<\/span>Buy<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">button<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">Cart<\/span> <span class=\"hljs-attr\">cartItem<\/span>=<span class=\"hljs-string\">{cartItem}<\/span> \/&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span><\/span>\n  )\n}\n\n<span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-keyword\">default<\/span> Product\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-7\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>Above, we did the following:<\/p>\n<ul>\n<li>\n<p>Imported the required dependencies.<\/p>\n<\/li>\n<li>\n<p>Created a <code>cartItem<\/code> state that will hold the data of the product in the cart.<\/p>\n<\/li>\n<li>\n<p>Created an <code>addToCart<\/code> function, which is an object containing the product\u2019s name and image. Then we passed <code>addToCart<\/code> to the button.<\/p>\n<\/li>\n<li>\n<p>Accessed the product\u2019s data from shoppable and displayed it.<\/p>\n<\/li>\n<li>\n<p>Passed the <code>cartItem<\/code> state to the <code>Cart<\/code> component. The <code>Cart<\/code> component will show the items the user bought.<\/p>\n<\/li>\n<\/ul>\n<p>Let\u2019s define the <code>Cart<\/code> component.<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-8\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\"><span class=\"hljs-keyword\">const<\/span> Cart = <span class=\"hljs-function\">(<span class=\"hljs-params\">{ cartItem }<\/span>) =&gt;<\/span> {\n  <span class=\"hljs-keyword\">return<\/span> (\n    <span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">className<\/span>=<span class=\"hljs-string\">\"cart-box\"<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">className<\/span>=<span class=\"hljs-string\">\"cart\"<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">h2<\/span>&gt;<\/span>Cart<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">h2<\/span>&gt;<\/span>\n        {cartItem ? (\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n            <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">img<\/span> <span class=\"hljs-attr\">src<\/span>=<span class=\"hljs-string\">{cartItem.imgUrl}<\/span> <span class=\"hljs-attr\">alt<\/span>=<span class=\"hljs-string\">\"a product\"<\/span> \/&gt;<\/span>\n            <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">span<\/span>&gt;<\/span>{cartItem.name}<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">span<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n        ) : (\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">span<\/span>&gt;<\/span>Cart is empty<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">span<\/span>&gt;<\/span>\n        )}\n      <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span><\/span>\n  )\n}\n\n<span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-keyword\">default<\/span> Cart\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-8\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>Here, we check to ensure an item is in the cart and display that item. With that, we have successfully added the product page.<\/p>\n<p>Here\u2019s a gif of the working demo.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cloudinary-marketing-res.cloudinary.com\/image\/upload\/c_limit,w_2000\/f_auto\/q_auto\/media_jams\/s_C7D46584DD5FE6990E0B822B9F77AE2BD475339A021078C4F5428D0B783A17E3_1658011517610_ezgif.com-gif-maker.gif\" alt=\"\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"600\" height=\"338\"\/><\/p>\n<h2>Conclusion<\/h2>\n<p>This article demonstrated how to add videos in a Blitz app using Cloudinary\u2019s Shoppable Video and Video Player.<\/p>\n<h2>Resources<\/h2>\n<ul>\n<li>\n<p><a href=\"https:\/\/cloudinary.com\/documentation\/video_player_shoppable_videos\">Shoppable<\/a> <a href=\"https:\/\/cloudinary.com\/documentation\/video_player_shoppable_videos\">V<\/a><a href=\"https:\/\/cloudinary.com\/documentation\/video_player_shoppable_videos\">ideo documentation<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/cloudinary.com\/documentation\/cloudinary_video_player#installation_and_setup\">Cloudinary Video Player documentation<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/cloudinary.com\/blog\/get_interactive_with_cloudinary_s_shoppable_video_and_video_player\">Get Interactive With Cloudinary\u2019s Shoppable Video and Video Player<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>","protected":false},"excerpt":{"rendered":"","protected":false},"author":41,"featured_media":27760,"comment_status":"","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_cloudinary_featured_overwrite":false,"footnotes":""},"categories":[1],"tags":[134,212,371,310],"class_list":["post-27759","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-guest-post","tag-next-js","tag-under-review","tag-video-player"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.6 (Yoast SEO v26.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Create Shoppable Videos in Blitz.js<\/title>\n<meta name=\"description\" content=\"In this article, we will learn how to add videos in a Blitz app using Cloudinary&#039;s Shoppable Video and Video Player.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cloudinary.com\/blog\/guest_post\/create-shoppable-videos-in-blitzjs\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create Shoppable Videos in Blitz.js\" \/>\n<meta property=\"og:description\" content=\"In this article, we will learn how to add videos in a Blitz app using Cloudinary&#039;s Shoppable Video and Video Player.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cloudinary.com\/blog\/guest_post\/create-shoppable-videos-in-blitzjs\/\" \/>\n<meta property=\"og:site_name\" content=\"Cloudinary Blog\" \/>\n<meta property=\"article:published_time\" content=\"2022-08-16T11:25:33+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681922383\/Web_Assets\/blog\/f712572b68131ebf6583d6ea288e3acd87949bcf-1200x1200-1_2776075504\/f712572b68131ebf6583d6ea288e3acd87949bcf-1200x1200-1_2776075504.jpg?_i=AA\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"1200\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"NewsArticle\",\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-shoppable-videos-in-blitzjs\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-shoppable-videos-in-blitzjs\/\"},\"author\":{\"name\":\"\",\"@id\":\"\"},\"headline\":\"Create Shoppable Videos in Blitz.js\",\"datePublished\":\"2022-08-16T11:25:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-shoppable-videos-in-blitzjs\/\"},\"wordCount\":6,\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-shoppable-videos-in-blitzjs\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681922383\/Web_Assets\/blog\/f712572b68131ebf6583d6ea288e3acd87949bcf-1200x1200-1_2776075504\/f712572b68131ebf6583d6ea288e3acd87949bcf-1200x1200-1_2776075504.jpg?_i=AA\",\"keywords\":[\"Guest Post\",\"Next.js\",\"Under Review\",\"Video Player\"],\"inLanguage\":\"en-US\",\"copyrightYear\":\"2022\",\"copyrightHolder\":{\"@id\":\"https:\/\/cloudinary.com\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-shoppable-videos-in-blitzjs\/\",\"url\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-shoppable-videos-in-blitzjs\/\",\"name\":\"Create Shoppable Videos in Blitz.js\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-shoppable-videos-in-blitzjs\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-shoppable-videos-in-blitzjs\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681922383\/Web_Assets\/blog\/f712572b68131ebf6583d6ea288e3acd87949bcf-1200x1200-1_2776075504\/f712572b68131ebf6583d6ea288e3acd87949bcf-1200x1200-1_2776075504.jpg?_i=AA\",\"datePublished\":\"2022-08-16T11:25:33+00:00\",\"description\":\"In this article, we will learn how to add videos in a Blitz app using Cloudinary's Shoppable Video and Video Player.\",\"breadcrumb\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-shoppable-videos-in-blitzjs\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cloudinary.com\/blog\/guest_post\/create-shoppable-videos-in-blitzjs\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-shoppable-videos-in-blitzjs\/#primaryimage\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681922383\/Web_Assets\/blog\/f712572b68131ebf6583d6ea288e3acd87949bcf-1200x1200-1_2776075504\/f712572b68131ebf6583d6ea288e3acd87949bcf-1200x1200-1_2776075504.jpg?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681922383\/Web_Assets\/blog\/f712572b68131ebf6583d6ea288e3acd87949bcf-1200x1200-1_2776075504\/f712572b68131ebf6583d6ea288e3acd87949bcf-1200x1200-1_2776075504.jpg?_i=AA\",\"width\":1200,\"height\":1200},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-shoppable-videos-in-blitzjs\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cloudinary.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create Shoppable Videos in Blitz.js\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\",\"url\":\"https:\/\/cloudinary.com\/blog\/\",\"name\":\"Cloudinary Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cloudinary.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\",\"name\":\"Cloudinary Blog\",\"url\":\"https:\/\/cloudinary.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA\",\"width\":312,\"height\":60,\"caption\":\"Cloudinary Blog\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Create Shoppable Videos in Blitz.js","description":"In this article, we will learn how to add videos in a Blitz app using Cloudinary's Shoppable Video and Video Player.","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:\/\/cloudinary.com\/blog\/guest_post\/create-shoppable-videos-in-blitzjs\/","og_locale":"en_US","og_type":"article","og_title":"Create Shoppable Videos in Blitz.js","og_description":"In this article, we will learn how to add videos in a Blitz app using Cloudinary's Shoppable Video and Video Player.","og_url":"https:\/\/cloudinary.com\/blog\/guest_post\/create-shoppable-videos-in-blitzjs\/","og_site_name":"Cloudinary Blog","article_published_time":"2022-08-16T11:25:33+00:00","og_image":[{"width":1200,"height":1200,"url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681922383\/Web_Assets\/blog\/f712572b68131ebf6583d6ea288e3acd87949bcf-1200x1200-1_2776075504\/f712572b68131ebf6583d6ea288e3acd87949bcf-1200x1200-1_2776075504.jpg?_i=AA","type":"image\/jpeg"}],"twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-shoppable-videos-in-blitzjs\/#article","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-shoppable-videos-in-blitzjs\/"},"author":{"name":"","@id":""},"headline":"Create Shoppable Videos in Blitz.js","datePublished":"2022-08-16T11:25:33+00:00","mainEntityOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-shoppable-videos-in-blitzjs\/"},"wordCount":6,"publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-shoppable-videos-in-blitzjs\/#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681922383\/Web_Assets\/blog\/f712572b68131ebf6583d6ea288e3acd87949bcf-1200x1200-1_2776075504\/f712572b68131ebf6583d6ea288e3acd87949bcf-1200x1200-1_2776075504.jpg?_i=AA","keywords":["Guest Post","Next.js","Under Review","Video Player"],"inLanguage":"en-US","copyrightYear":"2022","copyrightHolder":{"@id":"https:\/\/cloudinary.com\/#organization"}},{"@type":"WebPage","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-shoppable-videos-in-blitzjs\/","url":"https:\/\/cloudinary.com\/blog\/guest_post\/create-shoppable-videos-in-blitzjs\/","name":"Create Shoppable Videos in Blitz.js","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-shoppable-videos-in-blitzjs\/#primaryimage"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-shoppable-videos-in-blitzjs\/#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681922383\/Web_Assets\/blog\/f712572b68131ebf6583d6ea288e3acd87949bcf-1200x1200-1_2776075504\/f712572b68131ebf6583d6ea288e3acd87949bcf-1200x1200-1_2776075504.jpg?_i=AA","datePublished":"2022-08-16T11:25:33+00:00","description":"In this article, we will learn how to add videos in a Blitz app using Cloudinary's Shoppable Video and Video Player.","breadcrumb":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-shoppable-videos-in-blitzjs\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cloudinary.com\/blog\/guest_post\/create-shoppable-videos-in-blitzjs\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-shoppable-videos-in-blitzjs\/#primaryimage","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681922383\/Web_Assets\/blog\/f712572b68131ebf6583d6ea288e3acd87949bcf-1200x1200-1_2776075504\/f712572b68131ebf6583d6ea288e3acd87949bcf-1200x1200-1_2776075504.jpg?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681922383\/Web_Assets\/blog\/f712572b68131ebf6583d6ea288e3acd87949bcf-1200x1200-1_2776075504\/f712572b68131ebf6583d6ea288e3acd87949bcf-1200x1200-1_2776075504.jpg?_i=AA","width":1200,"height":1200},{"@type":"BreadcrumbList","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-shoppable-videos-in-blitzjs\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cloudinary.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Create Shoppable Videos in Blitz.js"}]},{"@type":"WebSite","@id":"https:\/\/cloudinary.com\/blog\/#website","url":"https:\/\/cloudinary.com\/blog\/","name":"Cloudinary Blog","description":"","publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cloudinary.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/cloudinary.com\/blog\/#organization","name":"Cloudinary Blog","url":"https:\/\/cloudinary.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA","width":312,"height":60,"caption":"Cloudinary Blog"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":""}]}},"jetpack_featured_media_url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681922383\/Web_Assets\/blog\/f712572b68131ebf6583d6ea288e3acd87949bcf-1200x1200-1_2776075504\/f712572b68131ebf6583d6ea288e3acd87949bcf-1200x1200-1_2776075504.jpg?_i=AA","_links":{"self":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/27759","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/comments?post=27759"}],"version-history":[{"count":0,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/27759\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media\/27760"}],"wp:attachment":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media?parent=27759"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/categories?post=27759"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/tags?post=27759"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}