Innanzitutto grazie FDA! Grazie davvero!
La pagina è creata come "elementi taggati", di seguito faccio copia-incolla di tutto il codice:
<?php
/**
* @package Joomla.Site
* @subpackage com_tags
*
* @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
//ini_set('display_errors', 'On');
//error_reporting(E_ALL);
defined('_JEXEC') or die;
// Note that there are certain parts of this layout used only when there is exactly one tag.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');
$isSingleTag = (count($this->item) == 1);
?>
<script src="cdnjs.cloudflare.com/ajax/libs/jquery.imagesloaded/3.1.8/imagesloaded.pkgd.js"></script>
<div class="tag-category<?php echo $this->pageclass_sfx; ?>">
<!-- --><?php //if ($this->params->get('show_page_heading')) : ?>
<!-- <h1>-->
<!-- --><?php //echo $this->escape($this->params->get('page_heading')); ?>
<!-- </h1>-->
<!-- --><?php //endif; ?>
<!-- --><?php //if ($this->params->get('show_tag_title', 1)) : ?>
<!-- <h2>-->
<!-- --><?php //echo JHtml::_('content.prepare', $this->tags_title, '', 'com_tag.tag'); ?>
<!-- </h2>-->
<!-- --><?php //endif; ?>
<!-- --><?php //// We only show a tag description if there is a single tag. ?>
<!-- --><?php //if (count($this->item) == 1 && (($this->params->get('tag_list_show_tag_image', 1)) || $this->params->get('tag_list_show_tag_description', 1))) : ?>
<!-- <div class="category-desc">-->
<!-- --><?php //$images = json_decode($this->item[0]->images); ?>
<!-- --><?php //if ($this->params->get('tag_list_show_tag_image', 1) == 1 && !empty($images->image_fulltext)) : ?>
<!-- <img src="--><?php //echo htmlspecialchars($images->image_fulltext); ?><!--">-->
<!-- --><?php //endif; ?>
<!-- --><?php //if ($this->params->get('tag_list_show_tag_description') == 1 && $this->item[0]->description) : ?>
<!-- --><?php //echo JHtml::_('content.prepare', $this->item[0]->description, '', 'com_tags.tag'); ?>
<!-- --><?php //endif; ?>
<!-- <div class="clr"></div>-->
<!-- </div>-->
<!-- --><?php //endif; ?>
<!-- --><?php //// If there are multiple tags and a description or image has been supplied use that. ?>
<!-- --><?php //if ($this->params->get('tag_list_show_tag_description', 1) || $this->params->get('show_description_image', 1)): ?>
<!-- --><?php //if ($this->params->get('show_description_image', 1) == 1 && $this->params->get('tag_list_image')) : ?>
<!-- <img src="--><?php //echo $this->params->get('tag_list_image'); ?><!--">-->
<!-- --><?php //endif; ?>
<!-- --><?php //if ($this->params->get('tag_list_description', '') > '') : ?>
<!-- --><?php //echo JHtml::_('content.prepare', $this->params->get('tag_list_description'), '', 'com_tags.tag'); ?>
<!-- --><?php //endif; ?>
<!---->
<!-- --><?php //endif; ?>
<!-- --><?php //echo $this->loadTemplate('items'); ?>
<!-- --><?php //if (($this->params->def('show_pagination', 1) == 1 || ($this->params->get('show_pagination') == 2)) && ($this->pagination->get('pages.total') > 1)) : ?>
<!-- <div class="pagination">-->
<!-- --><?php //if ($this->params->def('show_pagination_results', 1)) : ?>
<!-- <p class="counter pull-right"> --><?php //echo $this->pagination->getPagesCounter(); ?><!-- </p>-->
<!-- --><?php //endif; ?>
<!-- --><?php //echo $this->pagination->getPagesLinks(); ?>
<!-- </div>-->
<!-- --><?php //endif; ?>
<?php
// jimport('joomla.application.component.controller');
// $app = JFactory::getApplication();
//
// //j3 compatibility
// if(!defined('DS')){
// define('DS',DIRECTORY_SEPARATOR);
// }
//
// JLoader::register('J2StoreController', JPATH_COMPONENT.'/controllers/controller.php');
// JLoader::register('J2StoreModel', JPATH_ADMINISTRATOR.'/components/com_j2store/models/model.php');
// JLoader::register('J2StoreView', JPATH_ADMINISTRATOR.'/components/com_j2store/views/view.php');
//
// require_once (JPATH_ADMINISTRATOR.'/components/com_j2store/library/base.php');
// require_once (JPATH_SITE.'/components/com_j2store/helpers/utilities.php');
// require_once (JPATH_ADMINISTRATOR.'/components/com_j2store/library/prices.php');
// require_once (JPATH_ADMINISTRATOR.'/components/com_j2store/helpers/strapper.php');
// require_once (JPATH_ADMINISTRATOR.'/components/com_j2store/version.php');
// require_once (JPATH_SITE.'/components/com_j2store/models/products.php');
// J2StoreStrapper::addJS();
// J2StoreStrapper::addCSS();
$j2store_path = JPATH_ADMINISTRATOR.'/components/com_j2store/j2store.php';
if(JFile::exists($j2store_path)) {
require_once (JPATH_SITE.'/components/com_j2store/helpers/cart.php');
require_once (JPATH_ADMINISTRATOR.'/components/com_j2store/library/prices.php');
require_once (JPATH_SITE.'/components/com_j2store/models/products.php');
}
?>
<link href="<?php echo JURI::base().'media/j2store/css/j2store-product.css' ?>" rel="stylesheet" type="text/css">
<script src="cdnjs.cloudflare.com/ajax/libs/jquery.imagesloaded/3.1.8/imagesloaded.pkgd.js"></script>
<style>
.sm-row-fluid :nth-child(3n+4){margin-left:0; clear: both; }
.sm-row-fluid + table{display:none;}
.j2store-item-title-link {display:block;}
</style>
<style>
.j2store-item-title-link {position: relative;}
.fp-roksprocket-grids-maintop {position: absolute;}
.sprocket-grids-b-title {box-shadow: 0 0 12px #f2f2f2; text-shadow: 0 0 10px; font-family:OptimusPrinceps!important; font-size:16px!important; text-transform: capitalize!important;}
.j2store-item-productlist-thumbimage {width: 90%;}
</style>
<!-- <div class="row-fluid sm-row-fluid">-->
<div class="j2store-products-row cols-3 row-0 row">
// line 113 <?php foreach( $this->items as $value):
$this_prod_obj = new J2StoreModelProducts();
$this_prod_obj->setId($value->content_item_id);
$item = $this_prod_obj->getItem();
if($item->product_enabled):
$product = array(
'id' => $value->content_item_id,
'name' => $item->product_name,
'main_image' => $item->main_image ,
'price' => number_format ( $item->item_price, 2 ),
'special_price' => number_format ( $item->special_price, 2 ),
'discount' => number_format ( 100-($item->special_price*100/$item->item_price), 0 ),
'url' => JURI::base().'accessori/view/'.$value->content_item_id.'-'.$item->product_name
);
?>
<?php
$article_id = $value->content_item_id;
// $article =& JTable::getInstance("content");
$article = JTable::getInstance("content");
$article->load($article_id);
$created_date = $article->created;
// $date =& JFactory::getDate('now');
$date = JFactory::getDate('now');
$current_date = $date->__toString();
$diff = abs(strtotime($current_date) - strtotime($created_date));
$diff = $diff/86400;
if($diff < 14) $is_new_product = true;
else $is_new_product = false;
?>
<!-- <div style="display:none;" class="dump">-->
<!-- --><?php //echo '<pre>', var_dump($created_date) ,'</pre>'; ?>
<!-- </div>-->
<div class="span4 col-sm-4 col-xs-12" >
<div class="j2store-product-single j2store-product-single-113 column-1" itemscope="" itemtype="schema.org/Product" style="table-layout: fixed;">
<!-- on Before display product -->
<div class="j2store-before-display-product">
</div>
<!-- Form action starts here -->
<form action="/carrello" method="post" name="j2storeProductForm" id="j2store-product-list" class="j2storeProductForm" style="width:100%;">
<!-- Before displaying product Images -->
<div class="j2store-before-display-productimages">
</div>
<a itemprop="url" class="j2store-item-title-link" href="<?php echo $product['url'] ?>">
<?php if( $is_new_product ): ?>
<div class="fp-roksprocket-grids-maintop">
<h1 class="sprocket-grids-b-title">Nuovo</h1>
</div>
<?php endif; ?>
<img class="j2store-item-productlist-thumbimage" itemprop="image" src="<?php echo $product['main_image'] ?>" alt="<?php echo $product['name'] ;?>">
</a>
<!-- Title -->
<h1 class="j2store-item-title" itemprop="name">
<a itemprop="url" class="j2store-item-title-link" href="<?php echo $product['url'] ?>">
<?php echo $product['name']; ?>
</a>
</h1>
<div class="j2store-product-prices">
<span class="j2store-product-item-label">Prezzo</span>
<?php if($product['special_price'] > 0) echo '<strike>';?>
<span itemprop="offers" itemscope="" itemtype="schema.org/Offer">
<span itemprop="price" class="text" id="product_price_113"><?php echo $product['price'].' €'; ?></span>
</span>
<?php if($product['special_price'] > 0): echo '</strike>';?>
<span class="product-discount-offer" itemprop="offers" itemscope="" itemtype="schema.org/Offer">
<?php echo 'Sconto:'. $product['discount'].' %'; ?>
</span>
<span itemprop="offers" itemscope="" itemtype="schema.org/Offer">
<span itemprop="price" id="product_special_price_113" class="product-special-price"><?php echo $product['special_price'].' €'; ?></span>
</span>
<?php endif; ?>
</div>
<!-- <a id="addtoCartBtn" href="--><?php //echo $product['url'] ?><!--" type="submit" class="j2store-item-cart-button button " value="Aggiungi al carrello">Aggiungi al carrello</a>-->
<a id="" href="<?php echo $product['url'] ?>" type="submit" class="j2store-item-cart-button button " value="Aggiungi al carrello">Aggiungi al carrello</a>
</form>
</div><!-- end item -->
</div>
<?php endif; ?>
<?php endforeach; ?>
</div>
</div>
<script>
(function($){
var product_boxes = $('.j2store-product-single');
var heightarray = [];
imagesLoaded( 'body', function(factory){
setAllHeight( product_boxes );
});
var setAllHeight = function (element) {
var heightarray = element.map( function(){
return $(this).height();
}).get();
var product_boxes_height = Math.max.apply(Math,heightarray);
product_boxes.height(product_boxes_height)
}
})(jQuery);
</script>
Spero possiate darmi una mano... grazie infinite!