chrometweaks.org

Solution to transferring "unlocked" website to iPage from Hosting city?

Click Here To View All Answers...


First question I got is Solution to transferring "unlocked" website to iPage from Hosting city? Thanks in advance for any comment. 2nd question I got is.. Ok I hope this doesnt confuse anyone, but I am building my iPage site up and I have a few items that are price by size. Anyways so I put the price as zero and then used the product attributes to price my items. My question is, Is there anyway to hide the Zero price and just have the product attributes pricing displayed? Any help on this would be greatly appreciated.. TIA.

Kristina..

Comments (128)

I'm stumped. I'm not so sure what is the answer to your question. I'll do some research in Google and get back to you if I discover an answer. You should email the people at iPage as they probably could help you..

Comment #1

It's not that a better explanation is needed, you were quite clear...it's just that this has been discussed many times in the forums and is probably in the help docs. The search function is your friend. Regardless, I'll be nice:.

Open up includes/classes/currencies.php and find this:.

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

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

}.

}.

Replace it with this:.

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

If ($products_price<0{.

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

}else{.

Return '';.

}.

}.

}.

That will output a blank string if the price is 0 - you could change that blank string to have a line of text if you wanted..

There's also a contribution called "free call for price" or something like that...but I think for your purposes it would be overkill..

This post has been edited by.

BlueNoteMKVI.

: 16 May 2004, 06:45..

Comment #2

I did that already and here is the error message that I got!!.

Parse error: parse error in /home/kina24/public_html/includes/classes/currencies.php on line 78.

Fatal error: Cannot instantiate non-existent class: currencies in /home/kina24/public_html/includes/application_top.php on line 258.

What do I do? LOL figures..

Comment #3

Heh.. funny. I just posted to the Contibution forum because I thought the "Hide Price if $0.00" would solve the same issue. It did.. but now you can't purchase the product. D'oh!..

Comment #4

By the way, I removed my "Hide Price if $0.00" contribution and did what BlueNoteMkVI said to do. I got the same line 78 parse error. Line 78 happens to be:.

If ($products_price<0{.

Anyone see an issue with that line? I've also done searches on the subject and came up empty. I don't want to have the attribute system work like + or - because it just makes it too confusing for the customer. They should be able to drop the menu down and see the actual price next to the item...

Comment #5

Thats just what I'm trying to do. Let me know if you find anything out Graffe. I will do the same for you...

Comment #6

Thank you for trying SGershon! Sadly, that line still produces an error:.

Parse error: parse error, unexpected T_RETURN in /catalog/includes/classes/currencies.php on line 73.

I (and Kinokoruta probably as well) appreciate your help though!..

Comment #7

Hey, thanks for fixing my code!.

Kinokoruta - this isn't much help:.

Without this:.

Once I saw that, I knew instantly the problem - but someone got here before I did. If you have any errors that you can't figure out, it's best to post the offending line of code and a few above and below as well so that forum readers can see the code that's causing the issue and get an idea of what it's trying to do...

Comment #8

Okay.. I've got the store to work partially. It no longer displays the pricing. However, it does not display any pricing either. If you click on 'Add to Cart', then it displays the price in your cart but it has removed the pricing from items that are not zero as well. The code that is doing the above mentioned is:.

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

If ($products_price<0) {.

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

}else{.

Return '';.

}.

}.

}.

Any thoughts? I've also tried:.

If ($products_price<0.00) {..

Comment #9

Shameless bump being that I'd love to have my store up and running sometime this coming week. The code that BlueNoteMKVI posted is so, so close. I'm 99.9% sure this is the right route to go...

Comment #10

Oh heck...I apologize for my stupidity in giving that code out. I've been working too many hours lately..

If ($products_price<0) {.

That says "If the price is less than 0" (ie, a negative number).

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

That says "output the price of the product, formatted properly for the currency we're using, adding tax if necessary, multiplied by the quantity ordered.".

}else{.

Return '';.

Otherwise, output a blank string..

So...the price will only be displayed if it's LESS THAN 0. This is obviously wrong. Just make that < a > and you'll be good..

If ($products_price>0) {.

That's what you need...

Comment #11

Can someone post the correct block to change please, bit confused here...

Comment #12

Ok I hope this doesnt confuse anyone, but I am building my iPage site up and I have a few items that are price by size. Anyways so I put the price as zero and then used the product attributes to price my items. My question is, Is there anyway to hide the Zero price and just have the product attributes pricing displayed? Any help on this would be greatly appreciated.. TIA.

Kristina..

Comment #13

If anyone needs a better explanation let me know my email is thanks..

Comment #14


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