Update product data in magento 2

I am trying to update product data programmatically through scripts. The data gets updated in database but not getting reflected in admin panel. I am using magento 2.3.2 Here is my code $product = $productRepository->get(‘my-sku1’); if($product->getSku() != ”) { echo “Product found”, $product->getShortDescription(); $product->setShortDescription(‘This is my simple sample productttttttttt’); echo “########3”; $product->save(); // }

How to add multiple videos on fotorama gallery in Magento2?

I have to add multiple videos for each product on fotorama gallery. I am using this code, and it is working fine for a single video. <script> require([‘jquery’], function($) { $(document).on(‘gallery:loaded’, function () { var $fotorama = jQuery(‘div.gallery-placeholder > div.fotorama’); var fotorama = $fotorama.data(‘fotorama’); var video = ‘<?php echo $video_set[$i]; ?>’; $fotorama.on(‘fotorama:load’, function fotorama_onLoad(e, fotorama,…

Add static prefix to the product and category url

I have followed this tutorial Add a static URL prefix for product and category Magento 2 to create custom prefix for my store but i dont know why this is not working in my case I am sharing all the details here : etc/di.xml <?xml version=”1.0″?> <config xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:framework:ObjectManager/etc/config.xsd”> <preference for=”Magento\CatalogUrlRewrite\Model\ProductUrlPathGenerator” type=”Demo\Mod\Model\CatalogUrlRewrite\ProductUrlPathGenerator”/> <type name=”Magento\CatalogUrlRewrite\Model\CategoryUrlPathGenerator”> <plugin…