Sorry for my English.
I update my online store from 2.0.1.1 to 2.3.0.2. In which, there are two modes of display of quantity: in decimals for meters and in integers for items. Depending on the category, the display changed. In OC2.3, the item quantities are also displayed in decimal. I do not see selling 0.25 cm of an apron:D
Here is the code of the OC2.1 version:
Code: Select all
<div class="cart">
<div class="add-to-cart clearfix">
<p><label class="control-label" for="input-quantity"><?php echo $entry_qty; ?></label></p>
<div class="quantity">
<?php if (($category_id=='51')or($category_id=="55")or($category_id=="109")or($category_id=="186")or($category_id=="187")or($category_id=="188")or($category_id=="189")or($category_id=="190")or($category_id=="265")or($category_id=="282")or($category_id=="283")) { ?>
<input type="text" name="quantity" id="quantity_wanted" size="4" value="1" type="number" step="1" />
<script>
$(document).ready(function() {
$("#quantity").change(function() {
$(this).val(Math.ceil($(this).val()));
});
});
</script>
<?php } else { ?>
<select id="quantity" name="quantity">
<option value="1.00">1 m</option>
<option value="0.25">0.25 m</option>
<option value="0.50">0.50 m</option>
<option value="0.75">0.75 m</option>
<option value="1.25">1.25 m</option>
<option value="1.50">1.50 m</option>
<option value="1.75">1.75 m</option>
<option value="2.00">2 m</option>
<option value="2.25">2.25 m</option>
<option value="2.50">2.50 m</option>
<option value="2.75">2.75 m</option>
<option value="3.00">3 m</option>
<option value="3.25">3.25 m</option>
<option value="3.50">3.50 m</option>
<option value="3.75">3.75 m</option>
<option value="4.00">4 m</option>
<option value="4.25">4.25 m</option>
<option value="4.50">4.50 m</option>
<option value="4.75">4.75 m</option>
<option value="5.00">5 m</option></select>
<?php } ?>
</div>
<input type="hidden" name="product_id" size="1" value="<?php echo $product_id; ?>" />
<?php if($theme_options->get( 'display_add_to_cart' ) != '0' ) { ?>
<div class="cart-holder">
<input type="button" value="<?php if($theme_options->get( 'add_to_cart_text', $config->get( 'config_language_id' ) ) != '') { echo $theme_options->get( 'add_to_cart_text', $config->get( 'config_language_id' ) ); } else { echo 'Add to cart'; } ?>" id="button-cart" rel="<?php echo $product_id; ?>" class="button" />
<a href="<?php echo "https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; ?>" class="button" id="button-more-details"><?php if($theme_options->get( 'more_details_text', $config->get( 'config_language_id' ) ) != '') { echo html_entity_decode($theme_options->get( 'more_details_text', $config->get( 'config_language_id' ) )); } else { echo 'More details'; } ?></a>
</div>
<?php } ?>
<?php if($theme_options->get( 'display_add_to_compare' ) != '0') { ?>
<div class="compare-holder">
<a onclick="compare.add('<?php echo $product_id; ?>');" title="<?php if($theme_options->get( 'add_to_compare_text', $config->get( 'config_language_id' ) ) != '') { echo $theme_options->get( 'add_to_compare_text', $config->get( 'config_language_id' ) ); } else { echo 'Add to compare'; } ?>" class="fa fa-external-link product-icon"></a>
</div>
<?php } ?>
<?php if($theme_options->get( 'display_add_to_wishlist' ) != '0' ) { ?>
<div class="wishlist-holder">
<a onclick="wishlist.add('<?php echo $product_id; ?>');" title="<?php if($theme_options->get( 'add_to_wishlist_text', $config->get( 'config_language_id' ) ) != '') { echo $theme_options->get( 'add_to_wishlist_text', $config->get( 'config_language_id' ) ); } else { echo 'Add to wishlist'; } ?>" class="fa fa-heart-o product-icon"></a>
</div>
<?php } ?>
</div>
<?php if ($minimum > .99) { ?>
<div class="minimum"><?php echo $text_minimum; ?></div>
<?php } ?>
</div>
S.v.p., help me with this problem !!
Thank you
Mireille