News:

Looking for documentation? Take a look on our wiki

Main Menu

hidde stock for non registered users in flypage

Started by macauley70, July 09, 2014, 15:46:58 PM

Previous topic - Next topic

macauley70

hi.

I want hidde stock for non registered users

i use this code on flypage for show stock

Quote<div class="vmMainPage3">
          <div class="prod_details">
               <?php  if( $this->get_cfg('showManufacturerLink') ) { $rowspan = 5; } else { $rowspan = 4; } ?>
               <div class="vm_main_info clearfix">
                    <div class="lf">
                    <?php echo str_replace('<br/>', '', $product_image); ?>
                    </div>
                    <div class="rcolumn">
                         <h1><?php echo $product_name ?> <?php echo $edit_link ?></h1>
                         <h3><? echo $product_sku ?></h3>
                         <h4><? echo $product_in_stock ?> En Stock</h4>
                                                 <div class="pprice">
                         <?php echo $product_price_lbl ?> <?php echo $product_price ?>
                                                  </div>
                    </div>
               </div>

I want show stock only for registered users and non registered users dont show stock.

thanks alot



AH

Regards
A

Joomla 4.4.5
php 8.1

macauley70

thanks hutson

one question more

In whta part of the code i put this, in whta line, bwttewn what?

GJC Web Design


<?php if ($user->id != 0  ) { ?>
<h4><? echo $product_in_stock ?> En Stock</h4>
<?php } ?>
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation