Deals 1.1 Template

How about to change the line
<div class="bought">

with this one
<div style="border:1px solid #333; border-left:none; border-right:none;">
12 years 1 week ago #19 by andy

Please Log in or Create an account to join the conversation.

Hello again.

I added after line 82 the following code, but it does not display the data((

<div style="border:1px solid #333; border-left:none; border-right:none;">
<?php
$custom = json_decode($this->item->extra_fields);
$db = & JFactory::getDBO();
$id = $custom[3]->value;
$sql = 'SELECT product_ordered FROM #__virtuemart_products WHERE virtuemart_product_id='.$id;
$db->setQuery($sql) ;
$item_sold = $db->loadResult();
?>
<?php echo $this->item->numOfvotes.' <br> <span style="color:red; font-size:1.Sen">'.$item_sold.'</span> was bought';
?></div>
12 years 1 week ago #20 by Alfred

Please Log in or Create an account to join the conversation.

esposito,
I have explained above that for item.php you should use :
$custom = $this->item->extra_fields;
instead of
$custom = json_decode($this->item->extra_fields);
12 years 1 week ago #21 by andy

Please Log in or Create an account to join the conversation.

Hello dear. I am now on category_item.php and i believe that the above applies for item.php. Right?. I tried the code now on category_item.php and returns as result a line on top and " was bought". No numbers displayed.
12 years 1 week ago #22 by Alfred

Please Log in or Create an account to join the conversation.

I attach you the files i modified for your view. Many thanks
12 years 1 week ago #23 by Alfred

Please Log in or Create an account to join the conversation.

Hmm, i'm abit confuse, why you said that it worked properly in your past reply above?
So it was once worked then now it's not working any more?
Is there something you did that make the code is no longer worked?
Please let me know
12 years 1 week ago #24 by andy

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum