{"id":26984309,"url":"https://github.com/friendsofshopware/froshtemplateextensions","last_synced_at":"2025-07-30T03:06:44.320Z","repository":{"id":124650030,"uuid":"174030388","full_name":"FriendsOfShopware/FroshTemplateExtensions","owner":"FriendsOfShopware","description":"This plugin allows you to use additional template extensions","archived":false,"fork":false,"pushed_at":"2023-02-25T14:45:18.000Z","size":16,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-03T17:47:05.448Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FriendsOfShopware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-05T22:29:54.000Z","updated_at":"2023-02-25T14:45:23.000Z","dependencies_parsed_at":"2023-09-01T03:30:37.062Z","dependency_job_id":null,"html_url":"https://github.com/FriendsOfShopware/FroshTemplateExtensions","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FriendsOfShopware/FroshTemplateExtensions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FriendsOfShopware%2FFroshTemplateExtensions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FriendsOfShopware%2FFroshTemplateExtensions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FriendsOfShopware%2FFroshTemplateExtensions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FriendsOfShopware%2FFroshTemplateExtensions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FriendsOfShopware","download_url":"https://codeload.github.com/FriendsOfShopware/FroshTemplateExtensions/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FriendsOfShopware%2FFroshTemplateExtensions/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267802797,"owners_count":24146510,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-03T17:36:11.265Z","updated_at":"2025-07-30T03:06:44.304Z","avatar_url":"https://github.com/FriendsOfShopware.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FroshTemplateExtensions\n\n[![Join the chat at https://gitter.im/FriendsOfShopware/Lobby](https://badges.gitter.im/FriendsOfShopware/Lobby.svg)](https://gitter.im/FriendsOfShopware/Lobby)\n\n\nThe idea behind this plugin is to provide useful functions for theme developers in smarty.\n\n## Current available functions\n\n\n### Thumbnail\n\nYou generate with this function for every uploaded image custom thumbnails.\n\nFollowing parameters are available\n\n* id / path \n* width\n* height\n* keepProportion\n* quality\n\nAll images are generated using Shopware default Thumbnail Generator. So also all images are optimized\n\nExamples\n\n```\n\u003cimg src=\"{thumbnail id=739 width=1920 height=1920}\"\u003e\n```\n\n```\n\u003cimg src=\"{thumbnail path=media/image/foo.png width=1920 height=1920}\"\u003e\n```\n\n### Fetch\n\nFetch data from the database using the functions:\n\n* `fetchOne` - fetches a single value from the specified column of a row\n* `fetchRow` - fetches the first row from the specified table\n* `fetchAll` - fetches all rows from the specified table\n\nThe following parameters are available\n\n* `var` - required for `fetchRow` and `fetchAll`, defines the variable the resulting array will be stored in\n* `select` - may either be of type `string` or `array`, specifies the columns to be fetch, required for `fetchOne`\n* `from` - required for all functions, specifies the table to be fetched from\n* `where` - must be of type `array`, must contain key value pairs in the format of `'[column][operand]' =\u003e value` \n* `order` - must be of type `array`, must contain key value pairs in the format of `'[column]' =\u003e '[ASC][DESC]'` \n* `offset` - must be of type `integer`, sets the offset for the first result\n* `limit` - must be of type `integer`, sets the limit of results\n\nExamples\n\n```smarty\n{* Fetches the price of the last article added to basket of the current user *}\n{fetchOne select=\"price\" from=\"s_order_basket\" where=[\"modus =\" =\u003e 0, \"sessionID =\" =\u003e $smarty.session.Shopware.sessionId] order=[\"id\" =\u003e \"DESC\"]}\n\n{* Fetches the 5th to 15th row of s_articles *}\n{fetchAll var=\"articles\" from=\"s_articles\" offset=5 limit=10}\n{foreach $articles as $article}\n    Article: {$article.name} - {$article.description}\u003cbr\u003e\n{/foreach}\n\n{* Fetches the last order's id and ordernumber *}\n{fetchRow var=\"order\" select=[\"ordernumber\", \"id\"] from=\"s_order\" where=[\"status !=\" =\u003e -1] order=[\"ordertime\" =\u003e \"DESC\"]}\n{$order.id} - {$order.ordernumber}\n```\n\n*Please note:* The fetch functions need to be actived through the configuration of the plugin. They are disabled by default. \nBefore activating the fetch functions, please make sure, that none of your changes to your theme allow for unsanitized user \ninputs to be compiled as smarty.\n\n## Requirements\n\n- Shopware 5.5\n\n\n## Installation\n\n- Download latest release\n- Extract the zip file in `shopware_folder/custom/plugins/`\n\n\n## Contributing\n\nFeel free to fork and send pull requests!\n\n\n## Licence\n\nThis project uses the [MIT License](LICENCE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffriendsofshopware%2Ffroshtemplateextensions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffriendsofshopware%2Ffroshtemplateextensions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffriendsofshopware%2Ffroshtemplateextensions/lists"}