Skip to content

Commit

Permalink
Add missing details to other kinds of product option
Browse files Browse the repository at this point in the history
  • Loading branch information
Mesuva committed Jun 25, 2019
1 parent 245c05c commit a4e44c7
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
15 changes: 15 additions & 0 deletions blocks/community_product/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,11 @@ class="store-product-customer-price-label"><?= t('Amount'); ?></label>
?>
<div class="store-product-option-group form-group <?= $option->getHandle(); ?>">
<label class="store-product-option-group-label"><?= h($csm->t($option->getName(), 'optionName', $product->getID(), $option->getID())); ?></label>

<?php if ($details) { ?>
<span class="store-product-option-help-text help-block"><?= h($csm->t($details, 'optionDetails', $product->getID(), $option->getID())); ?></span>
<?php } ?>

<input class="store-product-option-entry form-control" <?= $requiredAttr; ?>
name="pt<?= $option->getID(); ?>"/>
</div>
Expand All @@ -325,6 +330,11 @@ class="store-product-customer-price-label"><?= t('Amount'); ?></label>
?>
<div class="store-product-option-group form-group <?= $option->getHandle(); ?>">
<label class="store-product-option-group-label"><?= h($csm->t($option->getName(), 'optionName', $product->getID(), $option->getID())); ?></label>

<?php if ($details) { ?>
<span class="store-product-option-help-text help-block"><?= h($csm->t($details, 'optionDetails', $product->getID(), $option->getID())); ?></span>
<?php } ?>

<textarea class="store-product-option-entry form-control" <?= $requiredAttr; ?>
name="pa<?= $option->getID(); ?>"></textarea>
</div>
Expand All @@ -339,6 +349,11 @@ class="store-product-option-checkbox-hidden <?= $option->getHandle(); ?>"
<input type="checkbox" value="<?= t('yes'); ?>"
class="store-product-option-checkbox <?= $option->getIncludeVariations() ? 'store-product-variation' : ''; ?> <?= $option->getHandle(); ?>"
name="pc<?= $option->getID(); ?>"/> <?= h($csm->t($option->getName(), 'optionName', $product->getID(), $option->getID())); ?></label>

<?php if ($details) { ?>
<span class="store-product-option-help-text help-block"><?= h($csm->t($details, 'optionDetails', $product->getID(), $option->getID())); ?></span>
<?php } ?>

</div>
<?php
} elseif ('hidden' == $optionType) {
Expand Down
15 changes: 15 additions & 0 deletions blocks/community_product_list/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -324,13 +324,23 @@
?>
<div class="store-product-option-group form-group <?= $option->getHandle(); ?>">
<label class="store-product-option-group-label"><?= h($csm->t($option->getName(), 'optionName', $product->getID(), $option->getID())); ?></label>

<?php if ($details) { ?>
<span class="store-product-option-help-text help-block"><?= h($csm->t($details, 'optionDetails', $product->getID(), $option->getID())); ?></span>
<?php } ?>

<input class="store-product-option-entry form-control" <?= $requiredAttr; ?> name="pt<?= $option->getID(); ?>"/>
</div>
<?php
} elseif ('textarea' == $optionType) {
?>
<div class="store-product-option-group form-group <?= $option->getHandle(); ?>">
<label class="store-product-option-group-label"><?= h($csm->t($option->getName(), 'optionName', $product->getID(), $option->getID())); ?></label>

<?php if ($details) { ?>
<span class="store-product-option-help-text help-block"><?= h($csm->t($details, 'optionDetails', $product->getID(), $option->getID())); ?></span>
<?php } ?>

<textarea class="store-product-option-entry form-control" <?= $requiredAttr; ?> name="pa<?= $option->getID(); ?>"></textarea>
</div>
<?php
Expand All @@ -340,6 +350,11 @@
<label class="store-product-option-group-label">
<input type="hidden" value="<?= t('no'); ?>" class="store-product-option-checkbox-hidden <?= $option->getHandle(); ?>" name="pc<?= $option->getID(); ?>"/>
<input type="checkbox" value="<?= t('yes'); ?>" class="store-product-option-checkbox <?= $option->getHandle(); ?>" name="pc<?= $option->getID(); ?>"/> <?= h($csm->t($option->getName(), 'optionName', $product->getID(), $option->getID())); ?></label>

<?php if ($details) { ?>
<span class="store-product-option-help-text help-block"><?= h($csm->t($details, 'optionDetails', $product->getID(), $option->getID())); ?></span>
<?php } ?>

</div>
<?php
} elseif ('hidden' == $optionType) {
Expand Down

0 comments on commit a4e44c7

Please sign in to comment.