chrometweaks.org

Whats the best place to host site iPage? Or which other recommended?

Click Here To View All Answers...


First question I got is Whats the best place to host site iPage? Or which other recommended? Hoping for any comment. My 2nd question... PLEASE CAN SOMEONE HELP ME..

I need to display 2 price columns in Product_Listing.php..

Price (Ex VAT).

And.

Price (Inc VAT).

I have seen a mod which displays this by showing both prices in the same price field, but this isn't suitable due to the large number of products we sell (10,000 +)..

I have changed some of the files called, and managed to get the required effect, but we a user is.

Logged on.

, both columns display the same price -.

Price (ex VAT).

..

File.

Currencies.php.

Around Line 71 I have Added:.

Function display_price($products_price, $products_tax, $quantity = 1) {.

Return $this->format(tep_add_tax($products_price, $products_tax) * $quantity);.

}.

New Line Added:.

Function display_price_ex($products_price, $products_tax, $quantity = 1) {.

Return $this->format($products_price * $quantity)'' ;.

}.

File.

Index.php.

Around Line 133 I have Added:.

'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,.

New Line Added:.

'PRODUCT_LIST_PRICE_EX' => PRODUCT_LIST_PRICE,.

'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,.

Around Line 226 I have Added:.

Case 'PRODUCT_LIST_PRICE':.

$listing_sql .= "final_price "($sort_order == 'd' ? 'desc' : '')", pd.products_name";.

Break;.

New Line Added:.

Case 'PRODUCT_LIST_PRICE_EX':.

$listing_sql .= "final_price "($sort_order == 'd' ? 'desc' : '')", pd.products_name";.

Break;.

File.

Product_listing.php.

Around line 46 I have added:.

Case 'PRODUCT_LIST_PRICE:.

$lc_text = TABLE_HEADING_PRICE;.

$lc_align = 'right';.

Break;.

New Line Added:.

Case 'PRODUCT_LIST_PRICE_EX':.

$lc_text = TABLE_HEADING_PRICE_EX;.

$lc_align = 'right';.

Break;.

Around Line 114 I have Added:.

Case 'PRODUCT_LIST_PRICE':.

$lc_align = 'right';.

If (tep_not_null($listing['specials_new_products_price'])) {.

$lc_text = '<span class="productSpecialPrice">'$currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id']))'</span><br><s>'$currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id']))'</s>';.

} else {.

$lc_text = ''$currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id']))'';.

}.

Break;.

New Line Added:.

Case 'PRODUCT_LIST_PRICE_EX':.

$lc_align = 'right';.

If (tep_not_null($listing['specials_new_products_price'])) {.

$lc_text = '<span class="productSpecialPrice">'$currencies->display_price_ex($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id']))'</span><br><s>'$currencies->display_price_ex($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id']))'</s>';.

} else {.

$lc_text = ''$currencies->display_price_ex($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id']))'';.

}.

Break;.

I think the problem is in the.

Product_listing.php.

File, but that is about as far as my PHP knowledge goes..

I have.

Display Prices with Tax.

Set to.

True.

In Admin if that helps..

Any help would be greatly appreciated...

Comments (38)

That's a good question. I'm not sure what is the answer to that question. I'll do some research and get back to you if I bump into an good answer. You should email the people at iPage as they probably can help you..

Comment #1

I have taken your advice, and added this as a contribution..

Http://www.oscommerc...tributions,1807..

Comment #2

YEP...very good....

I hacked your contribution for my needs - I need to display diferent price (several prices at one time regarding the way of the payment (cash, CC..etc..etc).

Off course the prices are different and percentage based..

I simply add * factor*tax percentage and get right what I wanted!.

For example:.

Function display_price_2($products_price, $products_tax, $quantity = 1) {.

Return $this->format($products_price * $quantity*0.94*1.22)'' ;.

}.

Function display_price_3($products_price, $products_tax, $quantity = 1) {.

Return $this->format($products_price * $quantity*0.9*1.22)'' ;.

}.

In that way I can enter prices via admin, and discount prices for payment types are shown automatically. It works for me...and if the percentage changes it is simple and fast to change....

Comment #3

How about rolling that up into the original contribution and adding a setting in Admin ~ My Store to select which price display to use and, for the tiered type, the percentage difference?.

Thanks for adding to the community!..

Comment #4

Jim that is an excellent suggestion, hopefully this will be done as it would be a lot handier to control from admin by a switch..

Comment #5

Well....

If only my knowledge of php would be adequate for me to do so....

Was experimenting with it but the problems were to tricky for me....

For example...zeee how the taxes are calculated in admin on product page, adding the possibility to have several prices precentage depended on the one base price and switch for it (radio button or something) for deployment would work for me (for my customers off course)...but I'm not shure if anybody else here would have any good use of that!?.

Anyway at this stage (at least for my programming skils) this is just wishfull thinking..

Respect!..

Comment #6

Hi all and thinks for the work on this.

After I installed this I found that there was a bit of code/change missing.

Needs.

Define('TABLE_HEADING_PRICE_EX', 'Price excl VAT');.

To be added to /catalog/includes/languages/english/index.php.

After.

Define('TABLE_HEADING_PRICE', 'Price incl VAT');.

Around line 25.

And all subsequent language files I guess.

HTH.

This post has been edited by.

Richjboyd.

: 31 March 2004, 15:53..

Comment #7

PLEASE CAN SOMEONE HELP ME..

I need to display 2 price columns in Product_Listing.php..

Price (Ex VAT).

And.

Price (Inc VAT).

I have seen a mod which displays this by showing both prices in the same price field, but this isn't suitable due to the large number of products we sell (10,000 +)..

I have changed some of the files called, and managed to get the required effect, but we a user is.

Logged on.

, both columns display the same price -.

Price (ex VAT).

..

File.

Currencies.php.

Around Line 71 I have Added:.

Function display_price($products_price, $products_tax, $quantity = 1) {.

Return $this->format(tep_add_tax($products_price, $products_tax) * $quantity);.

}.

New Line Added:.

Function display_price_ex($products_price, $products_tax, $quantity = 1) {.

Return $this->format($products_price * $quantity)'' ;.

}.

File.

Index.php.

Around Line 133 I have Added:.

'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,.

New Line Added:.

'PRODUCT_LIST_PRICE_EX' => PRODUCT_LIST_PRICE,.

'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,.

Around Line 226 I have Added:.

Case 'PRODUCT_LIST_PRICE':.

$listing_sql .= "final_price "($sort_order == 'd' ? 'desc' : '')", pd.products_name";.

Break;.

New Line Added:.

Case 'PRODUCT_LIST_PRICE_EX':.

$listing_sql .= "final_price "($sort_order == 'd' ? 'desc' : '')", pd.products_name";.

Break;.

File.

Product_listing.php.

Around line 46 I have added:.

Case 'PRODUCT_LIST_PRICE:.

$lc_text = TABLE_HEADING_PRICE;.

$lc_align = 'right';.

Break;.

New Line Added:.

Case 'PRODUCT_LIST_PRICE_EX':.

$lc_text = TABLE_HEADING_PRICE_EX;.

$lc_align = 'right';.

Break;.

Around Line 114 I have Added:.

Case 'PRODUCT_LIST_PRICE':.

$lc_align = 'right';.

If (tep_not_null($listing['specials_new_products_price'])) {.

$lc_text = '<span class="productSpecialPrice">'$currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id']))'</span><br><s>'$currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id']))'</s>';.

} else {.

$lc_text = ''$currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id']))'';.

}.

Break;.

New Line Added:.

Case 'PRODUCT_LIST_PRICE_EX':.

$lc_align = 'right';.

If (tep_not_null($listing['specials_new_products_price'])) {.

$lc_text = '<span class="productSpecialPrice">'$currencies->display_price_ex($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id']))'</span><br><s>'$currencies->display_price_ex($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id']))'</s>';.

} else {.

$lc_text = ''$currencies->display_price_ex($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id']))'';.

}.

Break;.

I think the problem is in the.

Product_listing.php.

File, but that is about as far as my PHP knowledge goes..

I have.

Display Prices with Tax.

Set to.

True.

In Admin if that helps..

Any help would be greatly appreciated...

Comment #8

I Fixed It..

I was just being a bit thick..

I had my Origin set wrong..

I might post this as a contribution...

Comment #9


This question was taken from a support group/message board and re-posted here so others can learn from it.