Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $purchasedFrom = $block->getPurchasedFromCollection();
- $registeredProducts = $block->getRegisteredProductsCollection();
- ?>
- <form class="form form-product-registration" action="<?php echo $this->getUrl("productregistration/newregistration/post") ?>" method="post" id="form-validate" enctype="multipart/form-data" data-hasrequired="<?= $block->escapeHtmlAttr(__('* Required Fields')) ?>" autocomplete="off">
- <fieldset class="fieldset newReg">
- <legend class="legend">
- <span><?= $block->escapeHtml(__('Register a new Product')) ?></span>
- </legend>
- <br>
- <?= $block->getBlockHtml('formkey') ?>
- <div class="field required">
- <label class="label">
- <span><?= $block->escapeHtml(__('Purchase Date')) ?></span>
- </label>
- <div class="control">
- <input type="date" name="purchased_date">
- </div>
- </div>
- <div class="field required">
- <label class="label">
- <span><?= $block->escapeHtml(__('Serial Number')) ?></span>
- </label>
- <div class="control">
- <input type="text" name="serial_number">
- </div>
- </div>
- <div class="field required">
- <label class="label">
- <span><?= $block->escapeHtml(__('Sku')) ?></span>
- </label>
- <div class="control">
- <input type="text" name="sku">
- </div>
- </div>
- <div class="field">
- <label class="label">
- <span><?= $block->escapeHtml(__('Product Type')) ?></span>
- </label>
- <div class="control">
- <input type="text" name="product_name">
- </div>
- </div>
- <div class="field">
- <label class="label">
- <span><?= $block->escapeHtml(__('Purchased From')) ?></span>
- </label>
- <div class="control">
- <!-- <input type="text" name="purchased_from"> -->
- <select name="purchased_from">
- <?php foreach ($purchasedFrom as $location):?>
- <option value="<?php echo $location->getId(); ?>"><?php echo $location->getStoreName(); ?></option>
- <?php endforeach; ?>
- </select>
- </div>
- </div>
- <div class="actions-toolbar">
- <div class="primary">
- <button type="submit" class="action save primary" title="<?= $block->escapeHtmlAttr(__('Save Registration')) ?>"><span><?= $block->escapeHtml(__('Save')) ?></span></button>
- </div>
- </div>
- </fieldset>
- <fieldset class="fieldset reg">
- <legend class="legend"><span><?= $block->escapeHtml(__('Registered Products')) ?></span></legend><br>
- <div class="field">
- <table class="table">
- <thead>
- <tr>
- <th>Serial Number</th>
- <th>Product Type</th>
- <th>Purchase Date</th>
- </tr>
- </thead>
- <tbody>
- <?php if (!empty($registeredProducts)) { ?>
- <?php foreach ($registeredProducts as $registered): ?>
- <tr>
- <td><?php echo $registered->getSerialNumber();?></td>
- <td><?php echo $registered->getProductName();?></td>
- <td><?php echo $registered->getPurchaseDate();?></td>
- </tr>
- <?php endforeach; ?>
- <?php } ?>
- </tbody>
- </table>
- </div>
- </fieldset>
- </form>
Add Comment
Please, Sign In to add comment