应用自定图片人性化设定礼品卡备注
2022-05-26 16:01:02
应用自定图片人性化设定礼品卡
备注
假如您应用Shopify的完全免费模板,您可以联络Shopify适用精英团队得到有关此实例教程的协助。此实例教程必须15分鐘的制定时长。若要掌握详细信息,客户程序Supportforthemes。
备注
此自定用以复古时尚Shopify模板,不适感用以“OnlineStore2.0”模板。
寻找您的模板构架版本号
探寻“OnlineStore2.0”模板自定
为礼品卡提交新图片
在Shopify后台管理中,转到在线商店模板。
寻找您要编写的模板,随后点击实际操作编写编码。
在Assets文件目录中,点击加上新财产。
点击选择文件,以访问到您电子计算机上的新礼品卡图片并提交。大家提议应用简易的文件夹名称,例如blue-giftcard.png
。
提醒:礼品卡图片的提议尺寸为950×550清晰度(您可以应用5:3的纵横比或最少规格450x270清晰度)。
点击提交财产。新的礼品卡图片将展示在您的Assets文件目录中。请记录下来文件扩展名(.png
或.jpg
)。
编写礼品卡模板文档,使其应用您的新图片
在Templates文件目录中,点击gift-card.liquid
。
在该文件中搜索下列编码:
liquid imgsrc={{gift-card/card.jpg|shopify_asset_url}}alt=
将它更换为下列编码:
liquid imgsrc={{blue-giftcard.png|asset_img_url:1024x1024}}alt=
点击储存。
备注:请保证依据须要将blue-giftcard.png
更改成新图片的文件夹名称和后缀名。
浏览您的新礼品卡图片
在模板文本编辑器中,点击右上方的自定模板。
开启模板编辑软件。
在网页顶端的下拉列表或在手机上的模板菜单栏中,挑选礼品卡。
Shopify商家官方网站全文详细信息:
Personalizegiftcardswithacustomimage
Note
IfyouuseafreethemefromShopify,thenyoumightbeabletocontactShopifySupportforhelpwiththistutorial.Itrequires15minutesofdesigntime.Tolearnmore,refertoSupportforthemes.
Note
ThiscustomizationisforvintageShopifythemes,anddoesntapplytoOnlineStore2.0themes.
Findoutyourthemesarchitectureversion
ExploreOnlineStore2.0themecustomizations
Uploadanewimageforyourgiftcard
FromyourShopifyadmin,gotoOnlineStoreThemes.
Findthethemeyouwanttoedit,andclickActionsEditcode.
IntheAssetsdirectory,clickAddanewasset.
ClickChooseFiletobrowsetothenewgiftcardimageonyourcomputeranduploadit.Wesuggestusingasimplefilename,forexample
blue-giftcard.png
.Tip
Therecommendedsizeforgiftcardimagesis950pxby550px(youcanalsouseanaspectratioof5:3oraminimumsizeof450pxby270px).
ClickUploadasset.ThenewgiftcardimagewillappearinyourAssetsdirectory.Takenoteofthefileextension(
.png
or.jpg
).Editthegiftcardtemplatefilesothatitusesyournewimage
IntheTemplatesdirectory,click
gift-card.liquid
.Findthefollowingcodewithinthefile:
imgsrc={{gift-card/card.jpg|shopify_asset_url}}alt=
Replaceitwiththefollowing:
imgsrc={{blue-giftcard.png|asset_img_url:1024x1024}}alt=
ClickSave.
Note
Makesuretochange
blue-giftcard.png
tothefilenameandextensionofthenewimageasneeded.Previewyournewgiftcardimage
Fromthethemecodeeditor,inthetopright-handcorner,clickCustomizetheme.
Openthethemeeditor.
Fromthedrop-downmenuatthetopofthepage,orfromtheTemplatesmenuonmobile,selectGiftcard.
文章由来:Shopify商家官网
部分文章来源于网络,如有侵权,请联系 caihong@youzan.com 删除。