Table in Article

  • curlingkc
  • Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 8 months ago #11301 by curlingkc
Table in Article was created by curlingkc
I have been trying to add the catagory table layout as seen in a menu component to an existing article.

I found a joomla extension plugin called "Plugin Include Component" that does just that.

In addition I have added a few tweeks like pricing to the table view except that the pricing will not carry over to the table loaded on the article. It Seems to drop the currency symbol and the first two digits.

I am not an expert on php so I am at a loss as to why it keeps dropping these digits but works great elsewhere.

Otherwise I am good to go.

Pricing in the catagories table view can be seen at test.kccurling.com/jupgrade/index.php/curling-programs

Pricing in catagory table embeded in article can be seen here. test.kccurling.com/jupgrade/index.php/cu...s/new-curlers/league

php used

<?php echo JText::_('EB_INDIVIDUAL_PRICE'); ?></strong> :
<?php
if ($item->individual_price > 0)
echo $this->config->currency_symbol.number_format($item->individual_price,2) ;
else
echo '<span class="eb_free">'.JText::_('EB_FREE').'</span>' ;
?>

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

  • curlingkc
  • Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 8 months ago #11337 by curlingkc
Replied by curlingkc on topic Re: Table in Article
I solved the problem by adding the following in bold

<?php
if ($item->individual_price > 0)
echo $this->config->currency_symbol.'&nbsp;&nbsp;'.number_format($item->individual_price,2,'.','') ;
else
echo '<span class="eb_free">'.JText::_('EB_FREE').'</span>' ;
?>

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

Moderators: Tuan Pham Ngoc