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
| <!-- Category Tabs --> | |
| <div v-if="activeView === 'list'" class="flex flex-wrap gap-2 mb-3"> | |
| <button v-for="cat in categories" :key="cat.id" | |
| class="px-3 py-1 border border-orange-500 hover:bg-orange-500 hover:text-black transition" | |
| :class="{'bg-orange-500 text-black': currentCategoryId === cat.id}" | |
| @click="loadProducts(cat.id, cat.name)"> | |
| {{ cat.name }} | |
| </button> | |
| </div> |
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
| <button class="block w-full py-3 border border-orange-500 hover:bg-orange-900 text-center px-4 text-lg" | |
| :class="{'bg-orange-500 text-black': menuSelection === 'Buy'}" | |
| @click="onMenuItemClick('Buy')"> | |
| <?= __('Buy'); ?> | |
| </button> | |
| <button class="block w-full py-3 border border-orange-500 hover:bg-orange-900 text-center px-4 text-lg" | |
| :class="{'bg-orange-500 text-black': menuSelection === 'Sell'}" | |
| @click="onMenuItemClick('Sell')"> | |
| <?= __('Sell'); ?> |
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
| <!-- Shopkeeper Avatar --> | |
| <div class="border-2 border-orange-500 p-2 flex justify-center items-center bg-black"> | |
| <img src="<?= $block->getViewFileUrl('Werules_GameShop::images/shopkeeper.png'); ?>" | |
| alt="<?= __('Shopkeeper Avatar'); ?>" | |
| class="w-32 h-32 object-cover border border-orange-500 bg-black avatar"> | |
| </div> | |
| <!-- Cart Count --> | |
| <div class="mb-4"> | |
| <div class="text-lg text-orange-400"><?= __('Cart items:'); ?></div> |
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 class="border-2 border-orange-500 p-3 sticky top-0 bg-black z-50"> | |
| <h1 class="text-3xl md:text-4xl font-bold tracking-widest uppercase"> | |
| <?php echo $currentStoreName; ?> | |
| </h1> | |
| </div> |
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 id="app" class="min-h-screen bg-black text-orange-200 font-mono p-6 flex flex-col space-y-4 text-lg"> |
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
| public function getProductsByCategoryId($categoryId) | |
| { | |
| if (!$this->isModuleEnabled()) { | |
| return []; | |
| } | |
| // Standard product retrieval logic | |
| } |
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
| public function getCartItemCount() | |
| { | |
| if (!$this->isModuleEnabled()) { | |
| return 0; | |
| } | |
| $quote = $this->cart->getQuote(); | |
| return (int)$quote->getItemsQty(); | |
| } |
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
| <?php | |
| namespace Werules\GameShop\Controller\Index; | |
| use Magento\Framework\App\Action\Action; | |
| use Magento\Framework\App\Action\Context; | |
| use Magento\Framework\Controller\ResultFactory; | |
| use Magento\Framework\App\Config\ScopeConfigInterface; | |
| class Index extends Action | |
| { |
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
| <?xml version="1.0"?> | |
| <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd"> | |
| <router id="standard"> | |
| <route id="werules_gameshop" frontName="game-shop"> | |
| <module name="Werules_GameShop"/> | |
| </route> | |
| </router> | |
| </config> |
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
| app/code/Werules/GameShop/ | |
| βββ Api/ | |
| β βββ CartManagementInterface.php | |
| β βββ CategoryManagementInterface.php | |
| β βββ ProductManagementInterface.php | |
| βββ Controller/ | |
| β βββ Index/ | |
| β β βββ Index.php | |
| βββ etc/ | |
| β βββ adminhtml/ |
NewerOlder