Deals 1.1 Template
- Posted by andy (759) Offline
How about to change the line
with this one
12 years 1 week ago #19
by andy
<div class="bought">
with this one
<div style="border:1px solid #333; border-left:none; border-right:none;">
Please Log in or Create an account to join the conversation.
- Posted by Alfred (50) Offline
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
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>
Please Log in or Create an account to join the conversation.
- Posted by andy (759) Offline
esposito,
I have explained above that for item.php you should use :instead of
12 years 1 week ago #21
by andy
I have explained above that for item.php you should use :
$custom = $this->item->extra_fields;
$custom = json_decode($this->item->extra_fields);
Please Log in or Create an account to join the conversation.
- Posted by Alfred (50) Offline
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.
- Posted by Alfred (50) Offline
- Posted by andy (759) Offline
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
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
Please Log in or Create an account to join the conversation.