Categories
CMS Drupal Mastering Development

Error when referencing Paragraphs in Feed mapping

I’m trying to import JSON data via Feeds in a Drupal 8 content type. When I map the fields in Feeds, all is well until I map a Paragraph field. After selecting the Paragraph type, the Fields remains empty until the page is saved: Note: Field options do not appear until a type has been […]

Categories
CMS Magento Mastering Development

No such entity cartId when send POST on /rest/default/V1/carts/mine/payment-information

According to documentation – https://devdocs.magento.com/guides/v2.4/rest/tutorials/orders/order-create-order.html I’m trying to make call on /rest/default/V1/carts/mine/payment-information with body: { "paymentMethod": { "method": "stripe_payments" }, "billing_address": { "email": "jdoe@example.com", "region": "New York", "region_id": 43, "region_code": "NY", "country_id": "US", "street": [ "123 Oak Ave" ], "postcode": "10577", "city": "Purchase", "telephone": "512-555-1111", "firstname": "Jane", "lastname": "Doe" } } and getting error: { […]

Categories
CMS Mastering Development Wordpress

Best and Simple way to add Multiple CSS files and Files folder in WordPress

I have found an excellent way to css in wordpress theme. You would see this very easy step making your efforts very simple. You need only to use these method very simply. <?php /** * Proper way to register and enqueue scripts and styles * Must read this:- *Note:- Import all CSS files in single […]

Categories
Mastering Development

Exclude directories & files from RecursiveDirectoryIterator

I’m trying to ZIP a folder and all its files and subfolder EXCEPT some files and folders. I have an array of files and folders to exclude. Works for the files, but folders in the exclude array are not excluded… here is the code : if(isset($_POST[‘tourpath’])){ $source = $_POST[‘tourpath’]; $cache_name = $_POST[‘cache_name’]; $destination = $cache_name.’.zip’; […]

Categories
CMS Joomla Mastering Development

Getting value from rows in admin list view

I have an admin list view. The mqsql table for that view has 4 columns/fields: id, name, email, phone To that admin list view, I have added a button. A user can select one/multiple records in that list view, and then the user can click that button. When the button is clicked, I want to […]

Categories
Mastering Development

Python program to print highest and lowest value only using for loop

I have to write a program to input 5 numbers from the user using for loop only and have to print the highest and lowest value But without using list,array, max and min function .

Categories
CMS Mastering Development Wordpress

Getting in an exception for get product detail by id in woocommerce REST api

I need to create an order in woocommerce REST API I have tried following code require(‘../wp-blog-header.php’); header("HTTP/1.1 200 OK"); header("Status: 200 All rosy"); require __DIR__ . ‘/vendor/autoload.php’; use Automattic\WooCommerce\Client; // Local Server $woocommerce = new Client( ‘https://exmapledomain.com/’, ‘key1’, ‘key2’, [ ‘wp_api’ => true, ‘timeout’ => 45000, ‘version’ => ‘wc/v3’, ] ); print_r($woocommerce->get(‘products/803’));exit; I am getting […]

Categories
CMS Mastering Development Wordpress

How to change the srcset of woocommerce product thumbnails

I am using the add_filter function to change the product image src and srcset. Unfortunately, only the src is changed but the srcset set remains the same. Which filter can I use to modify the srcset of woocommerce product images? Here’s the code: add_filter(‘wc_get_attachment_image_attributes’,array(<Class>,<Function>),999);

Categories
CMS Mastering Development

Tons of Apache TWIG errors on Craft 3 website

I’m only getting these errors on a select few pages of my website after upgrading from Craft 2 to Craft 3: TypeError: Argument 1 passed to craft\web\twig\variables\CraftVariable::entries() must be of the type array, string given, called in /srv/users/serverpilot/apps/water-institute/vendor/twig/twig/src/Extension/CoreExtension.php on line 1499 and defined in /srv/users/serverpilot/apps/water-institute/vendor/craftcms/cms/src/web/twig/variables/CraftVariable.php:240 Stack trace: #0 /srv/users/serverpilot/apps/water-institute/vendor/twig/twig/src/Extension/CoreExtension.php(1499): craft\web\twig\variables\CraftVariable->entries(‘technicalTeam’) #1 /srv/users/serverpilot/apps/water-institute/vendor/craftcms/cms/src/helpers/Template.php(92): twig_get_attribute(Object(craft\web\twig\Environment), Object(Twig\Source), Object(craft\web\twig\variables\CraftVariable), […]

Categories
CMS Magento Mastering Development

Magento 2.4 cannot edit customer admin

After using magento 2.4 updated from 2.3.5 about 2 weeks I noticed in some customer, which are subscribed in newsletters and have been sent from us 1 or more newsletter, when trying to edit in admin we get messed up page and error in logs: [2020-09-20 19:55:13] report.CRITICAL: Error: Call to a member function getId() […]