News:

Looking for documentation? Take a look on our wiki

Main Menu

Customize CustomField1 (php)

Started by nicodya, November 06, 2018, 10:27:12 AM

Previous topic - Next topic

nicodya

Hi guys, I want to do this: (look below, at the picture in attachment)

Page related: https://www.matelelettronica.it/catalogo/categorie/82-sicurezza/83-videosorveglianza/84-accessori/97-monitor/304-monitor-22-full-hd-lcd-5ms-detail.html

<?php
/**
* sublayout products
*
* @package VirtueMart
* @author Max Milbers
* @link http://www.virtuemart.net
* @copyright Copyright (c) 2014 VirtueMart Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL2, see LICENSE.php
* @version $Id: cart.php 7682 2014-02-26 17:07:20Z Milbo $
*/

defined('_JEXEC') or die('Restricted access');

$product $viewData['product'];
$position $viewData['position'];
$customTitle = isset($viewData['customTitle'])? $viewData['customTitle']: false;;
if(isset(
$viewData['class'])){
$class $viewData['class'];
} else {
$class 'product-fields';
}

if (!empty(
$product->customfieldsSorted[$position])) {
?>

<div class="<?php echo $class?>">
<?php
if($customTitle and isset($product->customfieldsSorted[$position][0])){
$field $product->customfieldsSorted[$position][0]; ?>

<div 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');
?>

</div> <?php
}
$custom_title null;
?>


<div class="product-fields-slider">
<?php
foreach ($product->customfieldsSorted[$position] as $field) {
if ( $field->is_hidden || empty($field->display)) continue; //OSP http://forum.virtuemart.net/index.php?topic=99320.0
?>
<div class="product-field product-field-type-<?php echo $field->field_type ?>">
<?php if (!$customTitle and $field->custom_title != $custom_title and $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>
<?php }
if (!empty($field->display)){
?>
<div class="product-field-display"><?php echo $field->display ?></div><?php
}
if (!empty($field->custom_desc)){
?>
<div class="product-field-desc"><?php echo vmText::_($field->custom_desc?></div> <?php
}
?>

</div>
<?php
$custom_title $field->custom_title;
?>

</div>
      <div class="clear"></div>
</div>
<?php
?>


Thank You  :)

GJC Web Design

u should be able to do it with css .. float the divs left and/or display inline-block etc
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

kishoreonwork

Hello ,

You content is wrapped in owl carousel , which is applying the fixed width of 120px on 'owl-item'.
You need to either remove the content from carousel  or you need to increase the width.

You should apply following css

.product-fields-title-wrapper{
float:left;
}
.product-field-display{
float:left;
}

Thanks
Kishore
I am available for paid joomla and virtuemart consulting.
http://www.kishoreweblabs.com/
skype kishore2607

nicodya