Nu doet hij dit netjes als het om 1 product gaat. maar als je een grouped product gebruikt
dat krijg je een uitgebreide versie, maar inplaatst van dat hij aangeeft:
- Beschikbaar of Er zijn er nog maar X over.
krijg je een dropdown, hierin is precies te zien hoeveel er in voorraad zijn.
maar nu wil ik de zelfde text hebben. dus zonder dat hij aan iedereen laat zien hoeveel producten er nog zijn, dat ze kunnen zien of het wel of niet beschikbaar is.
dat stoplicht systeem willen we niet gebruiken, dat ziet er niet zo geweldig uit.
Ik weet niet of die op een makkelijke manier te doen is, heb wel even gekeken naar de code maar word er niet heel wijzer van, ik kan zien wel stuk er voor zorgt dat ie de aantallen weergeeft
Code van de grouped product indicator ! :
Code: Selecteer alles
<?php if($this->isMsgVisible()): ?>
<a class="availability-only product-action feature feature-icon-hover" href="#" id="<?php echo $this->getPlaceholderId() ?>" title="<?php echo $this->__('Only %s left', ($this->getStockQty())) ?>">
<span class="ic ic-lowstock icon-color-productview"></span>
<span class="label"><?php echo $this->__('Only %s left', "<strong>{$this->getStockQty()}</strong>") ?><div class="caret"> </div></span>
</a>
<table id="<?php echo $this->getDetailsPlaceholderId() ?>" class="availability-only-details no-display">
<col />
<col width="1" />
<thead>
<tr>
<th><?php echo $this->__('Product Name') ?></th>
<th class="a-center"><?php echo $this->__('Qty') ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($this->getChildProducts() as $childProduct) : ?>
<?php $childProductStockQty = $this->getProductStockQty($childProduct); ?>
<?php if ($childProductStockQty > 0) : ?>
<tr>
<td><?php echo $childProduct->getName() ?></td>
<td class="a-center"><?php echo $childProductStockQty ?></td>
</tr>
<?php endif ?>
<?php endforeach ?>
</tbody>
</table>
<script type="text/javascript">
//<![CDATA[
$('<?php echo $this->getPlaceholderId() ?>').observe('click', function(event){
this.toggleClassName('expanded');
$('<?php echo $this->getDetailsPlaceholderId() ?>').toggleClassName('no-display');
event.stop();
decorateTable('<?php echo $this->getDetailsPlaceholderId() ?>');
});
//]]>
</script>
<?php endif ?>
Code van de standaard enkel product indicator:
Code: Selecteer alles
<?php if ($this->getProductQtyIncrements()) : ?>
<div class="product-pricing">
<?php echo $this->__('%s is available for purchase in increments of %s', $this->getProductName(), $this->getProductQtyIncrements()) ?>
</div>
<?php endif ?>