Created
February 2, 2025 18:47
-
-
Save blopa/002b28c336e276fd6bab4115ae004225 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 === 'detail' && currentProduct" class="space-y-4"> | |
<p class="italic text-lg mb-2"> | |
<?= sprintf(__('Ah, the %s! This item might do something special...'), '<strong>{{ currentProduct.name }}</strong>'); ?> | |
</p> | |
<div class="flex flex-col md:flex-row space-y-4 items-start border border-orange-500 p-4"> | |
<img :src="currentProduct.image_url" | |
class="w-72 h-72 object-cover border border-orange-500 bg-black"> | |
<div class="flex-1"> | |
<h3 class="text-2xl font-bold">{{ currentProduct.name }}</h3> | |
<p class="text-orange-300 text-xl mb-3">{{ formatPrice(product.price) }}</p> | |
<p class="text-lg text-orange-300"> | |
{{ currentProduct.description }} | |
</p> | |
</div> | |
</div> | |
<div class="flex flex-col sm:flex-row space-y-4 sm:space-y-0 sm:space-x-6"> | |
<button @click="addToCart(currentProduct.id)" | |
class="px-5 py-3 bg-orange-500 text-black border border-orange-500 hover:bg-orange-600 transition text-xl"> | |
<?= __('Add to Cart'); ?> | |
</button> | |
<button @click="goBackToList()" | |
class="px-5 py-3 border border-orange-500 hover:bg-orange-900 text-orange-200 transition text-xl"> | |
<?= __('Back'); ?> | |
</button> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment