Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Prices "with tax" in admin/categories.php


Guest

Recommended Posts

Hi all.

 

I wonder if it is possible to show my parts prices with tax in my admin. At present it only shows prices without tax, even though I have selected display prices with tax in the store configuration. Our catalog displays prices with tax, it seems only the ammin is missing something. The actual price for this product is $145 including our GST of 10%. It would just make it easier when checking prices.

 

I have included some pics.

 

Image1.jpg

 

 

and here at the preview screen

 

Image2.jpg

 

 

Any help would be appreciated.

 

 

Thanks in advance

Greg

 

B)

Link to comment
Share on other sites

Me again

 

Found one fix in the bug reports as per the following:-

In the admin file categories.php, the new_product_preview action ignores the tax class set and displays the price exclusive of tax even if 'display prices with tax' is set from configuration.

 

To Fix, Replace around line 525 in CVS FROM:

 

<td class="pageHeading" align="right"><?php echo $currencies->format($pInfo->products_price); ?></td>

 

WITH THIS:

<td class="pageHeading" align="right"><?php echo $currencies->display_price($pInfo->products_price, tep_get_tax_rate($pInfo->products_tax_class_id)); ?></td>

 

This is still also disregarding any special pricing set... but you get the idea :-)

 

or link directly to the bug report page here --->http://www.oscommerce.com/community/bugs,1066/search,tax/page,6

 

Cheers

Greg

Link to comment
Share on other sites

Hi

 

I searched all over for the answer for that, and could not find anything, but I found that if you search through the rest of admin/categories.php, towards the end of the file, you will find code that looks like the following,

 

           

 

            $contents[] = array('text' => '<br>' . TEXT_DATE_ADDED . ' ' . tep_date_short($cInfo->date_added));

            if (tep_not_null($cInfo->last_modified)) $contents[] = array('text' => TEXT_LAST_MODIFIED . ' ' . tep_date_short($cInfo->last_modified));

            $contents[] = array('text' => '<br>' . tep_info_image($cInfo->categories_image, $cInfo->categories_name, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT) . '<br>' . $cInfo->categories_image);

            $contents[] = array('text' => '<br>' . TEXT_SUBCATEGORIES . ' ' . $cInfo->childs_count . '<br>' . TEXT_PRODUCTS . ' ' . $cInfo->products_count);

          } elseif (isset($pInfo) && is_object($pInfo)) { // product info box contents

            $heading[] = array('text' => '<b>' . tep_get_products_name($pInfo->products_id, $languages_id) . '</b>');

 

            $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=new_product') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=delete_product') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a> <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=move_product') . '">' . tep_image_button('button_move.gif', IMAGE_MOVE) . '</a> <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=copy_to') . '">' . tep_image_button('button_copy_to.gif', IMAGE_COPY_TO) . '</a>');

            $contents[] = array('text' => '<br>' . TEXT_DATE_ADDED . ' ' . tep_date_short($pInfo->products_date_added));

            if (tep_not_null($pInfo->products_last_modified)) $contents[] = array('text' => TEXT_LAST_MODIFIED . ' ' . tep_date_short($pInfo->products_last_modified));

            if (date('Y-m-d') < $pInfo->products_date_available) $contents[] = array('text' => TEXT_DATE_AVAILABLE . ' ' . tep_date_short($pInfo->products_date_available));

            $contents[] = array('text' => '<br>' . tep_info_image($pInfo->products_image, $pInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '<br>' . $pInfo->products_image);

            $contents[] = array('text' => '<br>' . TEXT_PRODUCTS_PRICE_INFO . ' ' . $currencies->format($pInfo->products_price * 1.1) . '<br>' . TEXT_PRODUCTS_QUANTITY_INFO . ' ' . $pInfo->products_quantity);

            $contents[] = array('text' => '<br>' . TEXT_PRODUCTS_AVERAGE_RATING . ' ' . number_format($pInfo->average_rating, 2) . '%');

 

If you look through what I have quoted above, you will see that I have modified one line toward the bottom (ie products_price) and the modification is to multiply by 1.1 (ie products_price * 1.1)

 

I would think that this is not the best way to make the change, but it works none the less (as long as we don't see a rise in the GST rate.

 

There is probably already a variable that is being extraced from the database, or that can be extracted from the database, but I am not experienced enough to know how to do that yet.

 

Hope that helps.

 

Greg

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...