Exemplo n.º 1
0
    </span>
    <?php 
if (!trim(ps_product::product_has_attributes($row->product_id, true))) {
    ?>
    <div class="ice-addtocart">
      <form action="<?php 
    echo $row->addtocart_link;
    ?>
" method="post" name="addtocart" id="addtocart<?php 
    echo $row->product_id;
    ?>
" onsubmit="handleAddToCart( this.id );return false;" >
        <input type="hidden" name="option" value="com_virtuemart" />
        <input type="hidden" name="page" value="shop.cart" />
        <input type="hidden" name="Itemid" value="<?php 
    echo ps_session::getShopItemid();
    ?>
" />
        <input type="hidden" name="func" value="cartAdd" />
        <input type="hidden" name="prod_id" value="<?php 
    echo $row->product_id;
    ?>
" />
        <input type="hidden" name="product_id" value="<?php 
    echo $row->product_id;
    ?>
" />
        <input type="hidden" name="quantity" value="1" />
        <input type="hidden" name="set_price[]" value="" />
        <input type="hidden" name="adjust_price[]" value="" />
        <input type="hidden" name="master_product[]" value="" />
            <option value=""><?php 
    echo $VM_LANG->_('PHPSHOP_SELECT');
    ?>
</option>
        <?php 
    foreach ($res as $manufacturer) {
        $selected = '';
        if (@$_REQUEST['manufacturer_id'] == $manufacturer->manufacturer_id) {
            $selected = 'selected="selected"';
        }
        echo "<option value=\"" . $manufacturer->manufacturer_id . "\" {$selected}>" . $manufacturer->mf_name . "</option>\n";
    }
    ?>
        </select>
    <br />
      <input class="button" type="submit" name="manufacturerSearch" value="<?php 
    echo $VM_LANG->_('PHPSHOP_SEARCH_TITLE');
    ?>
" />
	    <input type="hidden" name="option" value="com_virtuemart" />
	    <input type="hidden" name="page" value="shop.browse" />
	    <input type="hidden" name="Itemid" value="<?php 
    echo $sess->getShopItemid();
    ?>
" />
      </form>
  </div>
<?php 
}
?>
<!-- End Manufacturer Module -->
<?php 
}
if( $show_dropdown == 1 ) { ?>
  <div style="color:#464545; padding-bottom:6px;">
  Please select: 
  	<form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="post" name="vm_manufacturer">
        <br/>
        <select class="inputbox" name="manufacturer_id" onchange="document.vm_manufacturer.submit()">
            <option value=""><?php echo $VM_LANG->_('PHPSHOP_SELECT') ?></option>
        <?php  
        foreach ($res as $manufacturer) { 
                $selected = '';
                if( @$_REQUEST['manufacturer_id'] == $manufacturer->manufacturer_id ) {
                        $selected = 'selected="selected"';      
                }
                echo "<option value=\"".$manufacturer->manufacturer_id ."\" $selected>". $manufacturer->mf_name ."</option>\n";

        } 
        ?>
        </select>
    <br />
      <?php /*?><input class="button" type="submit" name="manufacturerSearch" value="<?php echo $VM_LANG->_('PHPSHOP_SEARCH_TITLE') ?>" /><?php */?>
	    <input type="hidden" name="option" value="com_virtuemart" />
	    <input type="hidden" name="page" value="shop.browse" />
	    <input type="hidden" name="Itemid" value="<?php echo $sess->getShopItemid() ?>" />
      </form>
  </div>
<?php 
} 
?><!-- End Manufacturer Module -->
<?php if( !empty($price) ) { ?>
	<div class="box_product_price"><em>Price:</em><?php echo $price; ?> </div>
<?php } ?>

<!-- The add to cart DIV. -->
<div class="product_buttons">
	<div style="padding: 0px 0px 0px 0px;">
    	<div class="width">
			<a class="details" title="<?php echo $product_name ?>" href="<?php echo $product_link ?>"><?php echo "Details" ?></a>
<?php
if( !empty($addtocart_link) ) {
	?>
	<form action="<?php echo  $mm_action_url ?>index.php" method="post" name="addtocart" id="addtocart" style="width:81px; margin:auto">
    <input type="hidden" name="option" value="com_virtuemart" />
    <input type="hidden" name="page" value="shop.cart" />
    <input type="hidden" name="Itemid" value="<?php echo ps_session::getShopItemid(); ?>" />
    <input type="hidden" name="func" value="cartAdd" />
    <input type="hidden" name="prod_id" value="<?php echo $product_id; ?>" />
    <input type="hidden" name="product_id" value="<?php echo $product_id ?>" />
    <input type="hidden" name="quantity" value="1" />
    <input type="hidden" name="set_price[]" value="" />
    <input type="hidden" name="adjust_price[]" value="" />
    <input type="hidden" name="master_product[]" value="" />
    <input type="submit" class="addtocart_button_module" value="<?php echo $VM_LANG->_('PHPSHOP_CART_ADD_TO') ?>" title="<?php echo $VM_LANG->_('PHPSHOP_CART_ADD_TO') ?>" />
    </form>
	<?php
}
?>

</div></div></div>
</div>