Created
June 15, 2026 00:41
-
-
Save blopa/4ed998ff13decc6756a2dbbb990265fe to your computer and use it in GitHub Desktop.
Code for post "I built a retro RPG game shop extension for my Magento 2 store"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div v-if="activeView === 'list'"> | |
| <div v-if="products.length === 0" class="text-center text-orange-400 text-lg mt-6"> | |
| <?= __('No products found in this category.'); ?> | |
| </div> | |
| <div class="space-y-3"> | |
| <div v-for="product in products" :key="product.id" | |
| class="border border-orange-500 p-4 flex flex-col md:flex-row items-center cursor-pointer hover:bg-orange-900 transition" | |
| @click="showDetails(product)"> | |
| <img :src="product.image_url" | |
| class="w-32 h-32 object-cover border border-orange-500 bg-black"> | |
| <div class="flex-1 text-center md:text-left"> | |
| <span class="block text-lg">{{ product.name }}</span> | |
| <span class="block text-xl text-orange-300 mt-2">{{ formatPrice(product.price) }}</span> | |
| </div> | |
| </div> | |
| </div> | |
| </div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment