NSP Frontpage Module - if price is blank display word?

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Wed Jun 05, 2013 6:41 pm
Reply with quote
Report this post
Hi,

I wonder is it possible to have the NSP frontpage module popup bubble display something different if the price doesnt exist?

Currently you get a blank bubble but instead if you could add something like the word contact us or view or something it would be great.

Thanks,
Fionn
User avatar
Senior Boarder

teitbite
Wed Jun 05, 2013 11:58 pm
Reply with quote
Report this post
Hi

Sure it's possible. Please just let me know which NSP module version is that ?
User avatar
Moderator

GK User
Thu Jun 06, 2013 6:53 pm
Reply with quote
Report this post
Its NSP GK5
User avatar
Senior Boarder

GK User
Fri Jun 07, 2013 7:02 pm
Reply with quote
Report this post
Any luck?
User avatar
Senior Boarder

teitbite
Sun Jun 09, 2013 6:42 pm
Reply with quote
Report this post
Hi

I cannot see Your site anymore. Got 404 error when trying, but FTP works just fine. So I'll just tell You what to do. I can see You have already edited this file: /mod_news_pro_gk5/portal_modes/product_gallery/controller.php and the code You should use is right next to the edited part:

Code: Select all
if( $product->prices['salesPrice'] ) :
$news_price = $currency->createPriceDiv('salesPrice','',$product->prices);
else :
echo 'Text to display when there is no price';
endif;
User avatar
Moderator

GK User
Sun Jun 09, 2013 9:49 pm
Reply with quote
Report this post
Apologies site went live so now sits at: http://www.caseys.ie

The code you gave me displays the text under the description, I was hoping to have it go into the popup bubble? Kind of like when you are looking under a category view the bubble appears with the word view in it. (ive temp commented out the code you gave me)

Image
User avatar
Senior Boarder

teitbite
Tue Jun 11, 2013 8:24 am
Reply with quote
Report this post
Hi

I've just realized that VM script is hiding prices if there are none, so lets try to replace the line with text to:

Code: Select all
echo '<div class="PricesalesPrice" style="display : none;">'
. '<span class="PricesalesPrice">Text to display when there is no price</span>'
. '</div>';
User avatar
Moderator

GK User
Wed Jun 12, 2013 8:57 pm
Reply with quote
Report this post
Sorry im a nooblet what file and line am i replacing?

Thanks,
User avatar
Senior Boarder

teitbite
Fri Jun 14, 2013 9:44 am
Reply with quote
Report this post
Hi

We are still the file we both are fighting with since the begining :)
/mod_news_pro_gk5/portal_modes/product_gallery/controller.php

But I can see already that VM script will hide it again. Let's try with this code than and force it to show it no matter what:

Code: Select all
echo '<div class="PricesalesPrice">'
. '<span class="PricesalesPrice">Text to display when there is no price</span>'
. '</div>'
.'<style type="text/css">div.PricesalesPrice { display:block !important; }</style>';
User avatar
Moderator

GK User
Tue Jun 18, 2013 6:21 pm
Reply with quote
Report this post
Hi sorry for slow reply!

I added that code and all it did again was display the text underneath the product not in the bubble, ive commented it out again

Image
User avatar
Senior Boarder

teitbite
Wed Jun 19, 2013 10:37 pm
Reply with quote
Report this post
Hi

It worked, but we have been trying in wrong place. Try in line 51:

Code: Select all
            if(!$product->prices['salesPrice']):
               echo '<div class="gkImgOverlay">'
               .'<div class="PricebasePriceWithTax" style="display : block;">'
                  .'<span class="PricebasePriceWithTax">Text to display when there is no price</span>'
               .'</div>'
               .'<div class="PricetaxAmount" style="display : block;"></div>'
               .'</div>';
            endif;
User avatar
Moderator


cron