HomeWiki
HomeWiki
  1. Assets
  • Back to home
  • 1. Themes
  • Layout
    • New Layout
    • Legacy Layout
  • Components
    • Announcement
    • Banner Carousel
    • Banner With Products Carousel
    • Blog Category List
    • Blog List
    • Brand List
    • Brands Carousel
    • Breadcrumb
    • Call To Action
    • Cart
    • Categories List
    • Change Password
    • Checkout
    • Cookie Manager
    • Filter list
    • Footer
    • Forgot Password
    • Form
    • Hero Carousel
    • Icon Block
    • Invitation
    • Last Visited Products
    • Layout
    • Login
    • Map
    • Nav Bar
    • Offer
    • Product Attachments
    • Product Attributes
    • Product Documentation
    • Product Expected
    • Product Modal
    • Products Block
    • Products Carousel
    • Product Single
    • Profile
    • Quote
    • Register
    • Related Products
    • Search
    • Stores
    • Subscribe Newsletter
    • Text with Image
    • Top Bar
    • Video
  • Reusables
    • Getting Started
  • Assets
    • Getting Started
  • SDK
    • Products
      • _findProductsByCategory
      • _findProductsByIds
      • _findProductsByTitle
      • _findProductsByFilter
      • _findProductsByCriteria
      • _findProductsAndCalculate
      • _findProductsThenCalculate
      • _getProductAttributeSet
      • _setLastVisited
    • Categories
      • _findCategoryTreeById
      • _findCategoriesByIds
      • _findCategoryByAlias
      • _findCategoryTreeByAlias
      • _getCategoryContent
    • Collections
      • _getCollectionContent
      • _findCollectionsByIds
      • _findCollectionsByIdsThenCalculate
    • Brands
      • _getBrandContent
      • _findBrandsByIds
    • Cart
      • _addToCartMulti
      • _addToCart
      • _setCart
      • _clearCart
      • _setCartListener
      • _removeFromCart
      • _calculateCart
    • Checkout
      • _startCheckout
      • _updateCheckout
      • _completeCheckout
    • Shopping Lists
      • _getShoppingLists
      • _updateShoppingList
      • _createShoppingList
      • _deleteShoppingList
      • _getShoppingListByAlias
    • Navigation
      • _getFooterMenu
      • _getHeaderMenu
    • Users
      • _getUserById
    • Utils
      • _calculateCurrency
      • _getCurrencySymbol
      • _getCulture
      • _subscribeToNewsletter
      • _findUnitsByIds
  • Vs Code
    • Getting Started
  1. Assets

Getting Started

Managing and Using Assets in Shopranos Themes#

When working with themes on the Shopranos platform, you have the flexibility to manage your assets either through the VS Code plugin or directly within the Shopranos eCommerce platform. Here's how to handle your assets and use them effectively in your theme components and layout.

Uploading Assets#

1.
Via VS Code Plugin:
Navigate to the Assets menu in the Shopranos section of VS Code.
Upload your images, JavaScript files, CSS files, and other media directly to the assets folder.
2.
Via Shopranos eCommerce Platform:
Go to the Assets menu within the Shopranos admin panel.
Upload your assets through the platform interface.

Using Assets in Your Theme#

Once your assets are uploaded, you can reference them in your layout or components by using specific placeholders in your URLs. This ensures that your assets are correctly linked, regardless of whether you're working in a staging or production environment.
Example of how to use an asset in your theme:
{{Assets}} Placeholder:
This placeholder is automatically replaced by Shopranos with the correct URL for your assets, ensuring the links work correctly in both staging and production environments.
{{Version}} Placeholder:
This is used to help bypass caching, especially in production environments where assets are stored on a Content Delivery Network (CDN). By appending the ?version={{Version}} parameter, you can force browsers to load the latest version of your assets whenever you update them.

Key Points#

Managing Assets: You can manage assets easily through both the VS Code plugin and the Shopranos platform.
Dynamic URLs: Use {{Assets}} and {{Version}} in your URLs to ensure proper asset handling across different environments.
Cache Management: The {{Version}} parameter is essential for ensuring that your updates to assets are reflected without being stuck in cache, particularly in production settings.
By following these guidelines, you can ensure that your assets are correctly integrated into your Shopranos theme, providing a consistent and efficient experience across all environments.
Previous
Getting Started
Next
_findProductsByCategory
Built with