How To Change Product Sizes On Homepage In Magento And Youtube
Calculation Product Video
To add product video, you must first obtain an API Fundamental from your Google account and enter it in the configuration of your store. Then, you can link to the video from the product.
Step 1: Get your YouTube API key
-
Log in to your Google business relationship and visit the Google Developers Panel.
-
In the Search field at the superlative, enter
YouTube Data API v3
and click the search icon. -
When the API folio is displayed, make sure it is enabled.
-
In the left panel, choose Credentials.
-
Depending on whether you have credentials or non, do ane of the following:
-
If you already accept the needed credentials, re-create the key in the API keys table.
-
If you do not already have credentials for this API, click Create Credentials at the top and follow the prompts to create the needed credentials. Under Go your credentials, copy the API key and click Washed.
-
-
Copy the API key to the clipboard.
-
Click the Edit icon on the right and set the restrictions to make certain the API key is limited to the correct referrers.
-
Await a few moments while the primal is generated and then copy the key to the clipboard.
In the side by side footstep, you will paste the key into your shop's configuration.
Step 2: Configure the key in Commerce
-
On the Admin sidebar, get to Stores > Settings > Configuration.
-
In the left panel, expand Catalog and choose Catalog underneath.
-
Aggrandize
the Product Video section and paste your YouTube API key.
Production Video
-
When consummate, click Relieve Config.
-
When prompted, refresh the cache.
Stride 3: Link to the video
-
Open a product in edit style.
-
In the Images and Video section, click Add together Video.
If you oasis't all the same configured your YouTube API key, click OK to go along. Yous won't be able to link to a YouTube video, but you can get through the procedure.
Add together Video
-
Enter the URL of the YouTube or Vimeo video.
-
Click outside the field and await for feedback on the API fundamental or video.
If everything checks out, Youtube provides base of operations information of the video
-
Enter the Title and Description of the video.
-
To upload a Preview Image, browse to the paradigm and select the file.
-
If yous prefer to use the video meta information, click Get Video Data.
-
To determine how the video is used in the store, select the checkbox of each Office that applies:
-
Base Prototype
-
Small Image
-
Swatch Image
-
Thumbnail
-
Hibernate from Product Page
-
-
When consummate, click Salvage.
New Video
Maintaining API access
According to the Terms and Atmospheric condition, YouTube may disable API admission for accounts that have been inactive for more than 90 days. This may effect in your videos not displaying. To prevent this, utilise a cron job to ping the API at regular intervals:
xxx 10 one * * coil -i -G -e https://yourdomain.com/ -d "part=snippet&maxResults=one&q=test&cardinal=YOUTUBEAPIKEY" https://www.googleapis.com/youtube/v3/search >/dev/null 2>&one
Field reference
Field | Clarification |
---|---|
URL | The URL of the associated video. |
Title | The video title. |
Clarification | The video clarification. |
Preview Image | An uploaded paradigm that is used as a preview of the video in your store. |
Get Video Data | Retrieves the video meta information that is stored on the host server. You can use the original information or update it as needed. |
Function | Determines how the preview prototype is used in your store. You can choose any combination of options: Base Image, Small Image, Thumbnail, Swatch Image, Hide from Product Page |
Source: https://docs.magento.com/user-guide/catalog/product-video.html
Posted by: robbinsangleatild.blogspot.com
0 Response to "How To Change Product Sizes On Homepage In Magento And Youtube"
Post a Comment