Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

just got this working.

 

There are somethings I would like to change though, but as I know nothing about php need someone else's help.

 

First I would like the order of which it is displayed to be altered.

 

i.e. ?1.11 (inc VAT)

?0.99 (ex VAT)

 

to ?0.99 (ex VAT)

?1.11 (inc VAT)

 

The exclude VAT just looks pointless of being there then, I think, it's supposed to elude the customer into thinking 'ooo that's cheap' for a milisecond. and then go on to moan about our government. Anyway, drifting away from the point here.

 

That's the main thing that I want to do, but I would also like it to have this as the view regardless as whether the customer is logged in or not.

 

Anyone able to help me out?

 

Thankyou

 

Hippyer

Posted

ok, I got an email back from the creator of the contribution, with a new readme for me to do it. It didn't work, so since I have set everything back to how it used to be, and went through each step one at a time.

Here is the new readme, can anyone see any errors, because it doesn't work when I replace the first section.

 

n catalog/product_info.php



????????replace ?

? ? ? ? ? if ($products_options['options_values_price'] != '0') {

? ? ? ? ? ? $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';

? ? ? ? ? }





????????with



? ? ? ? if ($products_options['options_values_price'] != '0') {

? ? ? ? ????????$products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->format($products_options['options_values_price'] * 1 ).' ex VAT) (' . $products_options['price_prefix'] . $currencies->format(tep_add_tax($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) * 1 ).' inc VAT) ';

? ? ? ? ?}





In catalog/includes/classes/currencies.php

????????replace

????????????????return $this->format(tep_add_tax($products_price, $products_tax) * $quantity);



????????with

????????????????return $this= ?$this->format($products_price * $quantity) . '(ex <a href="' . tep_href_link(FILENAME_VAT, '', 'NONSSL') . '">VAT</a>)<br /> '. $this->format(tep_add_tax($products_price, $products_tax) * $quantity) . ' (inc <a href="' . tep_href_link(FILENAME_VAT, '', 'NONSSL') . '">VAT</a>)';





In catalog/includes/filenames.php add the following line

????????define( 'FILENAME_VAT', 'vat.php');



In catalog/includes/languages/english.php add

????????define('BOX_INFORMATION_VAT', 'What is VAT?');

under the line that says define('BOX_INFORMATION_SHIPPING', 'Shipping & Returns');



In catalog/includes/boxes/information.php add

????????'<a href="' . tep_href_link(FILENAME_VAT) . '">' . BOX_INFORMATION_VAT . '</a><br>' .

under the line that says '<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' .

 

This is the error I get when changing the currencies.php file as stated.

 

 

 

Fatal error: Call to a member function on a non-object in /var/www/html/cart/catalog/product_info.php on line 63

 

Thats on a product info page, on the default.php page in catalog I get this error

 

Fatal error: Call to a member function on a non-object in /var/www/html/cart/catalog/product_info.php on line 63

 

Anyway, whatever the problem is, I can't solve it. I've had alot of guessing to try and fix this, but nothing has worked. Maybe if I understood the code :(

Posted

That's amazing, I've been trying for hours then 2 minutes after I post that, something works. in the readme the currencices section has a

return $this = $this->

If anyone else wants to do this and finds this post, just use that readme and remove $this = so it looks like this instead

return $this->.........

Atleast I'm sorted now.

 

Even though I'm the only person who posted on this, I hope it's of use to someone else :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...