Welcome, Guest
Username: Password: Remember me
Use this Category for your support questions about Responsive Joomla Virtuemart Template - SportMart (SKU# FLEX-00019)

TOPIC: Minimun Quantity products not shown

Minimun Quantity products not shown 9 years 2 months ago #11770

Dear assistiance,

I have notice that maybe there is a little bug.
I have setted the minimun quantity to order 10 and the increment of 10 for buying see:
www.iacosport.com/sportmart/completi-calcio-classics-manica-corta/classics-completo-calcio-eagle_542d831dd59f1-detail.html

But the minimun quantity it is not shown and the increment it not 10 by 10 but remains 1 by 1.

Thanks
Last Edit: 9 years 2 months ago by ettore iacovacci.
The administrator has disabled public write access.

Minimun Quantity products not shown 9 years 2 months ago #11793

Hi,

I investigated this issue and found a bug in the codes.

To fix this problem:

Open this PHP file:
/templates/flexilbe_sportmart/html/com_virtuemart/productdetails/default_addtocart.php

and remove everything in this file, instead; copy-paste these lines;
<?php
/*------------------------------------------------------------------------
 # SportMart - Responsive Joomla Virtuemart Template
 # ------------------------------------------------------------------------
 # Copyright (C) 2009-2013 Flexible Web Design. All Rights Reserved.
 # @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPLv3
 # Author: Flexible Web Design
 # Website: http://www.flexiblewebdesign.com
 # Email: [email protected]
 -------------------------------------------------------------------------*/
 
// Check to ensure this file is included in Joomla!
defined ('_JEXEC') or die('Restricted access');
if (isset($this->product->step_order_level))
	$step=$this->product->step_order_level;
else
	$step=1;
if($step==0)
	$step=1;
$alert=JText::sprintf ('COM_VIRTUEMART_WRONG_AMOUNT_ADDED', $step);
?>
<div class="addtocart-area">
	<form method="post" class="product js-recalculate" target="_parent" action="<?php echo JRoute::_ ('index.php'); ?>">
    <input name="quantity" type="hidden" value="<?php echo $step ?>" />
		<?php // Product custom_fields
		if (!empty($this->product->customfieldsCart)) {
			?>
			<div class="product-fields">
				<?php foreach ($this->product->customfieldsCart as $field) { ?>
				<div class="product-field product-field-type-<?php echo $field->field_type ?>">
					<?php if ($field->show_title) { ?>
						<span class="product-fields-title-wrapper"><span class="product-fields-title"><strong><?php echo vmText::_ ($field->custom_title) ?></strong></span>
					<?php }
					if ($field->custom_tip) {
						echo JHTML::tooltip (vmText::_($field->custom_tip), vmText::_ ($field->custom_title), 'tooltip.png');
					} ?></span>
					<span class="product-field-display"><?php echo $field->display ?></span>
					<span class="product-field-desc"><?php echo vmText::_($field->custom_field_desc) ?></span>
				</div><br/>
				<?php } ?>
			</div>
			<?php
		}
		if (!empty($this->product->customsChilds)) {
			?>
			<div class="product-fields">
				<?php foreach ($this->product->customsChilds as $field) { ?>
 
				<div class="product-field product-field-type-<?php echo $field->field->field_type ?>">
					<span class="product-fields-title-wrapper"><span class="product-fields-title"><?php echo JText::_ ($field->field->custom_title) ?></span></span>
					<span class="product-field-display"><?php echo $field->display ?></span>
                    <span class="product-field-desc"><?php echo JText::_ ($field->field->custom_value) ?></span>
 
				</div><br/>
				<?php } ?>
			</div>
			<?php }
 
		if (!VmConfig::get('use_as_catalog', 0) and !empty($this->product->prices['salesPrice'])) {
		?>
 
		<div class="addtocart-bar">
 
			<?php // Display the quantity box
			$addtoCartCheck = "";
			if (preg_match("/addtocart-button-disabled/i", shopFunctionsF::getAddToCartButton($this->product->orderable))) {
				$addtoCartCheck = "FlexibleDisabled";
			}
			$stockhandle = VmConfig::get ('stockhandle', 'none');
			if (($stockhandle == 'disableit' or $stockhandle == 'disableadd') and ($this->product->product_in_stock - $this->product->product_ordered) < 1) {
				?>
                  <span class="FlexibleProductDetailsSoldOut"> <?php echo JTEXT::_('COM_VIRTUEMART_CART_PRODUCT_OUT_OF_STOCK'); ?> </span>
 
                  <a href="<?php echo JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&layout=notify&virtuemart_product_id=' . $this->product->virtuemart_product_id); ?>" class="notify flexibleButton" target="_parent"><?php echo JText::_ ('COM_VIRTUEMART_CART_NOTIFY') ?></a>
                  <?php } else { ?>
				 <?php if ($addtoCartCheck == "FlexibleDisabled") { ?><div class="FlexibleDisabledText">* <?php echo JTEXT::_('COM_VIRTUEMART_ADDTOCART_CHOOSE_VARIANT'); ?></div><?php } ?>
				 <div class="FlexibleCSS3Button <?php echo $addtoCartCheck ?>">
                  <span class="FlexibleCSS3ButtonInner">
                	<?php if ($addtoCartCheck == "FlexibleDisabled") { ?>
                	<span class="FlexibleCSS3Button-text" title="<?php echo JTEXT::_('COM_VIRTUEMART_CART_ADD_TO'); ?>" ><?php echo JTEXT::_('COM_VIRTUEMART_CART_ADD_TO');?><span>
                    <?php } else { ?>
                    <input class="addtocart-button FlexibleCSS3Button-text" type="submit" title="<?php echo JTEXT::_('COM_VIRTUEMART_ADDTOCART_CHOOSE_VARIANT');?>" value="<?php echo JTEXT::_('COM_VIRTUEMART_CART_ADD_TO');?>" name="addtocart" />
 
                    <?php } ?>
                	<span class="FlexibleCSS3Button-symbol"></span>
                	<span class="FlexibleCSS3Button-slide-icon"></span>
                 </span>
 
                 <?php if ($addtoCartCheck !== "FlexibleDisabled") { ?>
                 <span class="FlexibleCSS3ButtonQuantity">
                 <span class="quantity-controls js-recalculate FlexibleMinus">
					<input type="button" class="quantity-controls quantity-minus"/>
                 </span>
                 <span class="quantity-box FlexibleInput">
				 <input type="text" class="quantity-input js-recalculate" name="quantity[]" onblur="check(this);" value="<?php if (isset($this->product->step_order_level) && (int)$this->product->step_order_level > 0) {
						echo $this->product->step_order_level;
					} else if(!empty($this->product->min_order_level)){
						echo $this->product->min_order_level;
					}else {
						echo '1';
					} ?>"/>
	    		</span>
				<span class="quantity-controls js-recalculate FlexiblePlus">
					<input type="button" class="quantity-controls quantity-plus"/>
	    		</span>
                </span>
                 <?php } ?>
             </div> 
             <?php } ?>
			<div class="clear"></div>
		</div>
		<?php }
		 // Display the add to cart button END  ?>
		<input type="hidden" class="pname" value="<?php echo htmlentities($this->product->product_name, ENT_QUOTES, 'utf-8') ?>"/>
		<input type="hidden" name="option" value="com_virtuemart"/>
		<input type="hidden" name="view" value="cart"/>
		<input type="hidden" name="virtuemart_product_id[]" value="<?php echo $this->product->virtuemart_product_id ?>"/>
	</form>
 
	<div class="clear"></div>
</div>

then, the "default quantity value" will be the number you set as "Minimum Quantity" through Backend. If the "plus" icon is clicked, the increment will be the number you set for "Purchase Quantity Steps"

By the way, "minimum quantity to purchase" notification is not being displayed on the product details page. (it is not displayed with official Virtuemart as well).

But you can include this code snippet:
<?php if(!empty($this->product->min_order_level)){
	echo "<span style='color:#ff0000;'>Minimum quantity to purchase: <strong>". $this->product->min_order_level ."</strong></span>";
} ?>

at the bottom of this file (after the </div>)
/templates/flexilbe_sportmart/html/com_virtuemart/productdetails/default_addtocart.php

so your customers will know there is a "minimum quantity to purchase" the product.

the layout will look like this:

Attachment ScreenShot2015-01-24at5.27.27PM.png not found



If you like SportMart and satisfied with the support you have received, please "write a review" on:
www.flexiblewebdesign.com/Joomla-Virtuemart-Templates/SportMart

Write couple of sentences to share your experience with the support team.
Just 2-3 sentences would be enough ;) It might sound simple to you, but it is extremely important. Potential customers care about product reviews very much.

Thanks in advance!

Regards,
Support
Last Edit: 9 years 2 months ago by Support.
The administrator has disabled public write access.

Minimun Quantity products not shown 9 years 2 months ago #11805

Great!! It is perfect!

Is this also compatible with VM3 and Joomla3? I am thinking to wait the upgrade of sportmart before to put on line the website...
The administrator has disabled public write access.

Minimun Quantity products not shown 9 years 1 month ago #11828

SportMart is not currently compatible with J3.3+VM3.0 but it will be updated very soon (within February)

Like our Facebook Fun page or visit our website frequently to be notified.

Also, don't forget to rate SportMart via www.flexiblewebdesign.com/Joomla-Virtuemart-Templates/SportMart ;)

regards.
The administrator has disabled public write access.
Time to create page: 0.139 seconds

MaterialMart

for Virtuemart 3

Google's Material Design has finally arrived to Virtuemart

Virtumart Template - MaterialMart Virtumart Template - CleanMart Virtumart Template - CleanMart Virtumart Template - CleanMart

Fully responsive!

Buy Now   |   Live Demo