### Install Product Feed Extension (Composer)
Source: https://docs.ventatheme.com/magebit-code-library/extensions/product-feed
This command installs the Magebit Product Feed extension using Composer. Ensure Composer is installed and accessible in your environment. After installation, Magento's setup upgrade command must be run.
```bash
composer require magebitcom/module-product-feed
bin/magento setup:upgrade
```
--------------------------------
### Install Magebit Tracking Module
Source: https://docs.ventatheme.com/magebit-code-library/extensions/tracking/guide
Installs the Magebit Tracking module using Composer and updates the Magento database schema and data.
```bash
composer require magebitcom/magento2-module-tracking
bin/magento s:up
```
--------------------------------
### Run Venta Demo Data Command (Bash)
Source: https://docs.ventatheme.com/development/venta-project-setup
This command initializes essential demo configurations for the Venta theme, including search suggestions, product attributes, and PDP configurations. It is useful for local development and testing.
```bash
d/magento venta:demo-data
```
--------------------------------
### Sample Product Feed CSV Structure
Source: https://docs.ventatheme.com/magebit-code-library/extensions/product-feed
This CSV example provides a template for product feed data, similar to Google's default setup. It includes common product attributes such as ID, title, description, link, image link, availability, price, condition, brand, GTIN, and MPN for a single product.
```csv
id,title,description,link,image_link,availability,price,condition,brand,gtin,mpn
SKU124,"Demo Sneakers","High-quality sneakers ideal for everyday use.","https://www.example.com/products/sneakers","https://www.example.com/images/sneakers.jpg",in_stock,"49.99 USD","new","DemoBrand","0987654321098","DEM-SNK-002"
```
--------------------------------
### Sample Product Feed XML Structure
Source: https://docs.ventatheme.com/magebit-code-library/extensions/product-feed
This XML snippet demonstrates the basic structure of a product feed, conforming to Google Merchant Center standards. It includes essential fields like ID, title, description, link, image link, price, and availability for a single product item.
```xml
Example Store
https://www.examplestore.com
Example Product Feed12345Sample ProductSample product descriptionhttps://www.examplestore.com/sample-producthttps://www.examplestore.com/image.jpg29.99 USDin stock
```
--------------------------------
### Frontend Template for Rendering PayPal Shimmers
Source: https://docs.ventatheme.com/development/how-to-set-up-shimmer-express
This PHP snippet, intended for use within a Hyvä Theme template, retrieves PayPal funding methods using the ViewModel and renders shimmer placeholders. It utilizes ViewModelRegistry for accessing ViewModels and Tailwind CSS classes for styling. The output is an HTML structure with dynamic shimmer elements.
```php
use \\ViewModel\PayPalSdkFunding;
use Hyva\Theme\Model\ViewModelRegistry;
/** @var ViewModelRegistry $viewModels */
$paypalSdkFunding = $viewModels->require(PayPalSdkFunding::class);
$allowedMethods = $paypalSdkFunding->getSupportedFundingMethods();
// Ensure PayPal Express is always included
$allowedMethods = array_unique(array_merge(['paypal'], $allowedMethods));
$isMinicart = $isMinicart ?? false;
```
--------------------------------
### HTML Structure for PayPal Shimmer Containers
Source: https://docs.ventatheme.com/development/how-to-set-up-shimmer-express
This HTML snippet dynamically generates a container with shimmer placeholders based on the detected PayPal funding methods. It uses PHP for iteration and Tailwind CSS classes for styling. The output is a `div` element containing multiple `div` elements, each representing a shimmer.
```html
```
--------------------------------
### PHP ViewModel for PayPal Funding Methods
Source: https://docs.ventatheme.com/development/how-to-set-up-shimmer-express
This ViewModel extracts and exposes supported PayPal funding methods from the SDK URL to the frontend. It requires the Magento Framework and PayPal module. The output is an array of strings representing enabled funding methods.
```php
config = $config;
$this->config->setMethod(Config::METHOD_EXPRESS);
$this->sdkUrl = $sdkUrl;
}
/**
* Extract query parameters from the SDK URL
*
* @return array
*/
private function getUrlQueryParams(): array
{
$url = $this->sdkUrl->getUrl();
$uri = UriFactory::factory($url);
return $uri->getQueryAsArray();
}
/**
* Get supported funding methods
*
* @return string[]
*/
public function getSupportedFundingMethods(): array
{
$params = $this->getUrlQueryParams();
$enabledFunding = isset($params['enable-funding']) ? (string) $params['enable-funding'] : '';
if (empty($enabledFunding)) {
return [];
}
return explode(',', $enabledFunding);
}
}
```
--------------------------------
### JavaScript to Hide PayPal Shimmers on Render
Source: https://docs.ventatheme.com/development/how-to-set-up-shimmer-express
This JavaScript function hides the PayPal shimmer container once the actual Express Checkout buttons have successfully rendered. It uses `document.querySelector` to find the shimmer container and adds a 'hidden' class to it. This is crucial for avoiding layout shifts and ensuring a smooth user experience.
```javascript
function onRender() {
const shimmerContainer = document.querySelector(
".paypal-shimmer-container= $isMinicart ? '-mini-cart' : '' ?>"
);
if (shimmerContainer) {
shimmerContainer.classList.add("hidden");
}
}
```
--------------------------------
### Remove Login Step from Checkout in XML
Source: https://docs.ventatheme.com/development/how-to-rename-steps-2-step-checkout
This XML snippet demonstrates how to remove the 'Login' step from the checkout process by setting the 'remove' attribute to 'true'. This is useful when guest checkout is enabled and the login step is not desired, helping to streamline the user experience.
```xml
```
--------------------------------
### Define Custom Checkout Step Labels in XML
Source: https://docs.ventatheme.com/development/how-to-rename-steps-2-step-checkout
This XML configuration file allows you to override the default labels for steps within your Magento 2-step checkout process. You can customize specific steps or remove them entirely. Ensure the 'name' attribute matches your checkout configuration.
```xml
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.