AnonSec Shell
Server IP : 87.98.231.4  /  Your IP : 216.73.217.178   [ Reverse IP ]
Web Server : Apache
System : Linux webm007.cluster103.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User : grupmartgn ( 667608)
PHP Version : 8.5.7
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/grupmartgn/elanartcrafts/components/com_virtuemart/sublayouts/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /home/grupmartgn/elanartcrafts/components/com_virtuemart/sublayouts/snippets.php
<?php
/**
 *
 * renders the search engine snippets
 *
 * @package     VirtueMart
 * @subpackage
 * @author      The VirtueMart Team
 * @link        https://virtuemart.net
 * @copyright   Copyright (c) 2015 - 2019 VirtueMart Team. All rights reserved.
 * @license     https://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
 * @version     $Id: snippets.php 8024 2014-06-12 15:08:59Z Milbo $
 */

// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');
$document = JFactory::getDocument ();
$product = $viewData['product'];
$currency = $viewData['currency'];
$view = vRequest::getCmd('view');
$ratingModel = VmModel::getModel('Ratings');
$productrating = $ratingModel->getRatingByProduct($product->virtuemart_product_id);
if (is_object($productrating)) {
	$productratingcount = $productrating->ratingcount;
} else {
	$productratingcount = '0';
}

$canonicalUrl = JUri::getInstance()->toString(array('scheme', 'host', 'port')).JRoute::_($product->canonical);
$name = vRequest::vmSpecialChars(strip_tags($product->product_name));
if (VmConfig::get('show_manufacturers', 1)){
	$brand = (!empty($product->mf_name)? $product->mf_name : '');
} else {
	$brand = '';
}
$sku =  (!empty($product->product_sku)? $product->product_sku : '');
$productID =  $sku;
$mpn =  (!empty($product->product_mpn)? $product->product_mpn : '');
$review =  (!empty($ratingModel->ids[0]->comment)? $ratingModel->ids[0]->comment : '');
$author =  (!empty($ratingModel->ids[0]->name)? $ratingModel->ids[0]->name : '');

//do something sensible and not fixed with valid price date
$DownDate = new DateTime($product->prices["product_price_publish_down"]);
$DownCalcDate = new DateTime();
if ($DownDate > $DownCalcDate) {
	$priceUntil = $DownDate->format( "Y-m-d" );
} else {
//  $DownCalcDate->modify('+20 years');
//  $priceUntil = $DownCalcDate->format( "Y-m-d" );
//  dont show an end to this price if there is not one
	$priceUntil = '';
}

//GJC and Roderic look for parent & for child stock
//$stockog = 'InStock';
$stockhandle = VmConfig::get ('stockhandle', 'none');
$finalstk = $product->product_in_stock - $product->product_ordered;
if ($stockhandle == 'none') {
	$stockog = 'InStock';
} elseif ($stockhandle == 'disableit_children' and $product->product_parent_id == 0) {
	$prodmodel = VmModel::getModel ('product');
	$children = $prodmodel->getProductChilds($product->virtuemart_product_id);
	$finalstk = $product->product_in_stock - $product->product_ordered;
	foreach($children as $child){
		$finalstk += $child->product_in_stock - $child->product_ordered;
	}
} else {
	$finalstk = $product->product_in_stock - $product->product_ordered;
}
if ($finalstk != 0) {
	$stockog = 'InStock';
}
if ($finalstk == 0) {
	$stockog = 'OutOfStock';
}


//check for meta if empty move onto using product data
if (!empty($document->getMetaData('description'))) {
	$description = $document->getMetaData('description');
}
if (empty($description)){
	if (!empty($product->product_s_desc)){
		$description = $product->product_s_desc;
	} else {
		$description = $product->product_desc;
	}
}
$description = str_replace('"','\"',vRequest::vmSpecialChars(strip_tags($description)));
?>

<script type="application/ld+json">
{
  "@context": "http://schema.org/",
  "@type": "Product",
  "name": "<?php echo $name; ?>",
  "description":"<?php echo $description; ?>",
<?php if ($brand) { ?>
  "brand": {
    "@type": "Thing",
    "name": "<?php echo $brand; ?>"
  },
<?php
	}?>
<?php if ($productID) { ?>
  "productID":"<?php echo $productID; ?>",
<?php } ?>
<?php if ($sku) { ?>
  "sku": "<?php echo $sku; ?>",
<?php } ?>
<?php if ($mpn) { ?>
  "mpn": "<?php echo $mpn; ?>",
<?php } ?>
<?php if ( $product->images[0]->virtuemart_media_id > 0) {
		$i = 0;
		$numimages = count($product->images); ?>
  "image": [
<?php
		foreach($product->images as $image){
			echo '    "' . JURI::root().$image->file_url. '"';
			if (++$i != $numimages){
				echo ', ';
			}
		} ?>
  ],
<?php  } ?>
<?php if ($viewData['showRating'] && $productratingcount > 0) { ?>
  "aggregateRating":{
    "@type": "AggregateRating",
    "ratingValue": "<?php echo $product->rating; ?>",
    "reviewCount": "<?php echo $productratingcount; ?>"
  },
<?php } ?>
<?php if ($review) { ?>
  "review": {
    "@type": "Review",
    "reviewBody": "<?php echo $review; ?>",
    "author": {
      "@type": "Person",
      "name": "<?php echo $author; ?>"
    }
  },
<?php } ?>
  "offers": {
    "@type": "Offer",
    "priceCurrency": "<?php echo $currency->_vendorCurrency_code_3; ?>",
    "availability": "<?php echo $stockog; ?>",
    "price": "<?php echo $product->prices['salesPrice']; ?>",
    "url": "<?php  echo $canonicalUrl; ?>",
<?php if ($priceUntil) { ?>
    "priceValidUntil": "<?php  echo $priceUntil; ?>",
<?php } ?>
    "itemCondition": "NewCondition"
  }
}
</script>

Anon7 - 2022
AnonSec Team