display virtuemart products dutch language

News Show Pro GK5 - flexible, responsive and easily extendable free Joomla module support forum.
Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
GK User
Tue Nov 11, 2014 7:49 pm
Hi there,

Got some weird language problem in my settings...(site should be in Dutch only)

Joomla 2.5.27 Settings:
Installed - Site - Dutch (NL) default
Installed - Administrator - Dutch (NL) default
Content - English (UK) 0 - Dutch (NL) 1

Virtuemart 2.6.12.2 Settings:
Languages Settings Multilingual shop - English (United Kingdom)

My Products & Categories are in Dutch (NL), with flag?

When I add NSP to publish random products nothing shows.
When switching all joomla language to english it shows in english.
Also if I set vm to Dutch I can't select all products or categories.

If anyone could tell me how to use NSP to display Dutch products...

Thanks in advance,
Pascal
User avatar
Gold Boarder

teitbite
Fri Nov 14, 2014 10:27 am
Hi

Looks like Your products are set in english tables only. Please send me an access to joomla panel.
User avatar
Moderator

teitbite
Sun Nov 16, 2014 10:37 am
Hi,

I already solved some issues about the vm languages.
In short;
I exported vm language files (GB and NL)
compaired and completed both and imported (phpmyadmin)

Right now both are ok and same.
Also NSP shows in GB.
Is there a separate language file to change texts to NL?

Regards,


Do You mean NSP ? There is a file called en-GB.mod_news_pro_gk5.ini You need to copy it to nl-NL folder, changr the suffix and translate.
User avatar
Moderator

GK User
Mon Nov 17, 2014 8:47 am
Yes exactly that file,

Last question: In VM I use override price for my products, where/how can I set/change this in NSP product gallery?
Right now NPS and VM are different....Is there a template file for this?

Regards,

Pascal
User avatar
Gold Boarder

teitbite
Tue Nov 18, 2014 11:23 am
Hi

NSP is showing "basePriceWithTax" for now. Please show me where this NSP module is so I'll check which style You are using and hopefully will find how to change to other price.
User avatar
Moderator

GK User
Tue Nov 18, 2014 11:47 am
Hi teitbite,

You can see site at: http://pasvorm.com/maxx/ (bottom shows random products with News Show Pro GK5 ver. 1.7.0.1)
Module mode: product gallery
Price type: Sales price

This should be the same as browsepages like http://pasvorm.com/maxx/binnendeuren/hpl-deuren

VM is also used as catalogue so the add to cart would also be replaced by 'more info'.

Thanks and regards,

Pascal
User avatar
Gold Boarder

GK User
Tue Nov 18, 2014 3:40 pm
Hi,
I'm not sure but is this the file generating the NSP product gallery?

/modules/mod_news_pro_gk5/tmpl/com_virtuemart/view.php

How can I change this to display Override price and Cost price?

Thanks in advance,

Pascal
User avatar
Gold Boarder

teitbite
Thu Nov 20, 2014 10:17 am
Hi

This could be right file or You may need to look directly in /tmpl/portal_modes/product_gallery/controller.php

I can see there are 2 prices showing there already. Have You found a way to make it by Your own ?
User avatar
Moderator

GK User
Thu Nov 20, 2014 10:25 am
Hi,

No, I can't find the price items that display in the circle, it should be like baseprice (with linethrough) and override price (as on vm page)

Hope you can kick me in right direction.

Regards Pascal.
User avatar
Gold Boarder

teitbite
Thu Nov 20, 2014 12:27 pm
Hi

I think I know. In file /tmpl/portal_modes/product_gallery/controller.php there are lines like:

Code: Select all
        $news_price.= $currency->createPriceDiv('basePriceWithTax','',$product->prices);
        // calculate tax
        $taxAmount = $currency->createPriceDiv('taxAmount','MOD_NEWS_PRO_GK5_PRODUCT_TAX_AMOUNT',$product->prices);


this is the place where "basePriceWithTax" and "taxAmount" are names or the price type showing in circle. You need to replace them with names You want to show instead.

to show what names are available and what price is shown please add this right below this lines:

Code: Select all
print '<pre>';
var_dump('$product->prices');
print '</pre>';
User avatar
Moderator

GK User
Thu Nov 20, 2014 1:31 pm
Hi,

Code look different?? I'm lost...

/**
* Product Gallery
* @package News Show Pro GK5
* @Copyright (C) 2009-2013 Gavick.com
* @ All rights reserved
* @ Joomla! is Free Software
* @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
* @version $Revision: GK5 1.3.3 $
**/


Code: Select all
        $news_price = '<div class="PricebasePriceWithTax">';
        //
        if($config['vm_show_price_type'] != 'none') {
            if($config['vm_display_type'] == 'text_price') {
               $news_price .=  '<span class="PricebasePriceWithTax">'.JText::_('MOD_NEWS_PRO_GK5_PRODUCT_PRICE').' '.$price.'</span>';
            } else {
               $news_price .= '<span class="PricebasePriceWithTax">'.$price.'</span>';
            }
        }
        $news_price .= '</div>';
          // display discount
        if($config['vm_show_discount_amount'] == 1) {
           $news_price .= '<div class="PricetaxAmount">';
            $disc_amount = str_replace('.',$cDecSymbol,number_format($product->prices['discountAmount'],$cDecimals));
            if($config['vm_currency_position'] == 'before') { 
               $disc_amount = $cSymbol.' '.$disc_amount;
            } else {
               $disc_amount = $disc_amount.' '.$cSymbol;
            }
            $news_price .= JText::_('MOD_NEWS_PRO_GK5_PRODUCT_DISCOUNT_AMOUNT'). $disc_amount;
            $news_price .= '</div>';
        }
      // display tax
        if($config['vm_show_tax'] == 1) {
           $news_price .= '<div class="PricetaxAmount">';
             $taxAmount = str_replace('.',$cDecSymbol,number_format($product->prices['taxAmount'],$cDecimals));
            if($config['vm_currency_position'] == 'before') { 
               $taxAmount = $cSymbol.' '.$taxAmount;
            } else {
               $taxAmount = $taxAmount.' '.$cSymbol;
            }
            $news_price.= JText::_('MOD_NEWS_PRO_GK5_PRODUCT_TAX_AMOUNT'). $taxAmount; 
            $news_price .= '</div>';
        }
       // 'Add to cart' button
       $news_cart = '';
       //if($config['vm_add_to_cart'] == 1) {
           $code = '<form method="post" class="product" action="index.php">';
           $code .= '<div class="addtocart-bar">';
           $code .= '<span class="quantity-box" style="display: none"><input type="text" class="quantity-input" name="quantity[]" value="1" /></span>';
          
           $button_lbl = JText::_('MOD_NEWS_PRO_GK5_COM_VIRTUEMART_CART_ADD_TO');
         $button_cls = '';
           $stockhandle = VmConfig::get('stockhandle','none');
          
           $code .= '<span class="addtocart-button"><input type="submit" name="addtocart" class="addtocart-button" value="'.$button_lbl.'" title="'.$button_lbl.'" /></span>';
              
           $code .= '</div>
                   <input type="hidden" class="pname" value="'.$product->product_name.'"/>
                   <input type="hidden" name="option" value="com_virtuemart" />
                   <input type="hidden" name="view" value="cart" />
                   <noscript><input type="hidden" name="task" value="add" /></noscript>
                   <input type="hidden" name="virtuemart_product_id[]" value="'.$product->virtuemart_product_id.'" />
                   <input type="hidden" name="virtuemart_category_id[]" value="'.$product->virtuemart_category_id.'" />
               </form>';   
              
           $news_cart .= $code;
      //}
      // restults
       return array(
          "price" => $news_price,
          "cart" => $news_cart
       );
   }
User avatar
Gold Boarder

teitbite
Sun Nov 23, 2014 10:45 am
Hi

Are You using the latest version of the module ? Please make sure You are checking in /tmpl/portal_modes/product_gallery/ ?? Please send me an access to ftp, so I'll check directly on Your site.
User avatar
Moderator

GK User
Sun Nov 23, 2014 3:28 pm
Hi there,

Just sent you a PM.

Regards,


Pascal
User avatar
Gold Boarder

teitbite
Mon Nov 24, 2014 11:13 am
Hi

I got Your joomla panel access already. I need an FTP access now to compare my version with Yours and find a new place changes should be made to.
User avatar
Moderator

GK User
Mon Nov 24, 2014 2:09 pm
Hi,
Just send you ftp access.

Regards,
Pascal
User avatar
Gold Boarder

GK User
Wed Nov 26, 2014 5:29 pm
Hello Teitbite,

Did you receive the ftp account? I send it as PM.

Really need to know if it can be fixed.

Thanks in advance,
Pascal

teitbite wrote:Hi

I got Your joomla panel access already. I need an FTP access now to compare my version with Yours and find a new place changes should be made to.
User avatar
Gold Boarder

teitbite
Wed Nov 26, 2014 8:28 pm
Hi

No sorry. I have not received an ftp. I've just checked PM again, but I'm sure it's not there. Please send it one more time.
User avatar
Moderator

GK User
Wed Nov 26, 2014 9:38 pm
Hi,

Just send you the ftp info again.
Please let me know if received.

Regards,

Pascal
User avatar
Gold Boarder

teitbite
Thu Nov 27, 2014 1:53 pm
Hi

I had to disable all cache because it was not possible to check this.

You have modified old files, this is why I was not working. I said /tmpl/portal_modes/product_gallery/controller.php and You have edited /portal_modes/product_gallery/controller.php Whole this part was moved to /tmpl folder so overrides can now be done in template. Those are the same files, but only /tmpl folder files works.

Here is a list of available prices for product Norhtgo N913 93x211.5 Stomp Incl. Blank Facet Glas:

Code: Select all
array(18) {
  ["costPrice"]=>
  string(9) "322.31000"
  ["basePrice"]=>
  float(322.31)
  ["basePriceVariant"]=>
  float(322.31)
  ["basePriceWithTax"]=>
  float(389.9951)
  ["discountedPriceWithoutTax"]=>
  float(112.3149)
  ["priceBeforeTax"]=>
  float(322.31)
  ["salesPrice"]=>
  string(9) "180.00000"
  ["taxAmount"]=>
  float(67.6851)
  ["salesPriceWithDiscount"]=>
  float(0)
  ["salesPriceTemp"]=>
  float(389.9951)
  ["unitPrice"]=>
  float(0)
  ["discountAmount"]=>
  float(-209.9951)
  ["priceWithoutTax"]=>
  float(322.31)
  ["variantModification"]=>
  float(0)
  ["DBTax"]=>
  array(0) {
  }
}


Using this example please select price You want to show and in line 162 of the same file change "$config['vm_show_price_type']" to the name You want to show. For example:
'priceBeforeTax'.
User avatar
Moderator

teitbite
Thu Nov 27, 2014 1:55 pm
Hi

Acctually. Please do not do anything. Please just look at the price options and tell me which one to show and I'll make it for You in temlate overrides in template's /html folder.
User avatar
Moderator

GK User
Thu Nov 27, 2014 2:25 pm
Hi,

Should be the same as vm category and product page;
guess in the bottom and circle display: 'salesPrice' (big) and 'basePriceWithTax' (price-crossed)
And no cart icon but text 'details'
Right now only 1 is displayed, I disabled this in module settings.

Thanks in advance,
Pascal
User avatar
Gold Boarder

teitbite
Thu Nov 27, 2014 2:58 pm
Hi

I've configured NSP to show "salesPrice" and enabled "Show discount amount". Than in /tmpl/portal_modes/product_gallery/controller.php I've used the code for discount in line 160 changing "discountAmount" to "".

Than couple of fixes in override.css file:

Code: Select all
.gkNspPM .PricebasePriceWithTax {
    text-decoration: none;
}

.gkNspPM .PricetaxAmount {
    text-decoration: line-through;
}

.gkNspPM-ProductGallery .gkAddToCart input.addtocart-button {
    background: none repeat scroll 0 0 rgba(0, 0, 0, 0);
}
User avatar
Moderator

GK User
Fri Nov 28, 2014 12:40 pm
Hi,

Thanks for the explaination but it's still confusing...
So the modified/override is at: /modules/mod_news_pro_gk5/tmpl/portal_modes/product_gallery/controller.php

But looking at this file at line 160 this says: '$productModel = new VirtueMartModelProduct();'??

Could you please explain on what line to replace the 'discount amount' to 'basePriceWithTax'?

To disable cart symbol should I use this in override.css?
Code: Select all
.gkNspPM-ProductGallery .gkAddToCart input.addtocart-button {
    background: none;
}



Thanks and regards,

Pascal
User avatar
Gold Boarder

teitbite
Fri Nov 28, 2014 10:14 pm
Hi

Sorry, a typo it should say line 190. I've also missed the information to which price I've changed it. It was as You said "basePriceWithTax", but looks like this price variant is lower.

The code to remove cart icon has to be with a bigger priority. Now I can see it's being overwritten by module's code.

Code: Select all
.gkNspPM-ProductGallery .gkAddToCart input.addtocart-button {
    background: none repeat scroll 0 0 rgba(0, 0, 0, 0) !important;
}
User avatar
Moderator

GK User
Mon Dec 01, 2014 1:55 pm
Hi there,
Thanks so much, but i've got 2 last questions;

In: /modules/mod_news_pro_gk5/tmpl/portal_modes/product_gallery/controller.php
how can I replace/change the text 'discount / korting' to 'base price / adviesprijs'?

I see this code for discount display, how can this be modified to show 'baseprice'?

Code: Select all
 
// display discount
        if($config['vm_show_discount_amount'] == 1) {
           $news_price .= '<div class="PricetaxAmount">';
            $disc_amount = str_replace('.',$cDecSymbol,number_format($product->prices['basePriceWithTax'],$cDecimals));
            if($config['vm_currency_position'] == 'before') { 
               $disc_amount = $cSymbol.' '.$disc_amount;
            } else {
               $disc_amount = $disc_amount.' '.$cSymbol;
            }
            $news_price .= JText::_('MOD_NEWS_PRO_GK5_PRODUCT_DISCOUNT_AMOUNT'). $disc_amount;
            $news_price .= '</div>';
        }


2. Can I just copy this /modules/mod_news_pro_gk5/tmpl/portal_modes/product_gallery/ to use on live site?

Thanks and regards,

Pascal
User avatar
Gold Boarder

teitbite
Wed Dec 03, 2014 9:30 am
Hi

I've only used the code displaying a discount, but I've replaced the price to showing to $product->prices['basePriceWithTax'].

Texts like discount / korting and base price / adviesprijs You need replace in module's language file in /languages joomla folder.

2. Yes, You can just replace the files. Just remember to do this with the same module version.
User avatar
Moderator

GK User
Wed Dec 03, 2014 10:32 am
Hi Teitbite,

It still shows the discount value? -€ .... You can see if you go to product page.
I already changed text.

Thanks,

Pascal
User avatar
Gold Boarder

GK User
Wed Dec 03, 2014 1:21 pm
Hi there,

Did some trail & error, but guess it's ok now?
In controller.php line 190 I changed 'discountAmount' to 'basePriceWithTax' like this:
$disc_amount = str_replace('.',$cDecSymbol,number_format($product->prices['basePriceWithTax'],$cDecimals));
Please let me know if this is done right.

Regards,

Pascal
User avatar
Gold Boarder

GK User
Thu Dec 04, 2014 1:48 pm
Hi Teitbite,
Got 1 last issue; click on 'detail' in NPS links to 'home' instead of product detail?
How can this be fixed?

Thanks and regards,
Pascal
User avatar
Gold Boarder

teitbite
Sun Dec 07, 2014 4:01 pm
Hi

What You did is correct. In fact this is exactly what I've done ;/ Interesting thing is that it got overwritten and You had to make it again.

Here is an explanation to linking problem You have https://www.gavick.com/documentation/jo ... s-working/
User avatar
Moderator

GK User
Thu Dec 11, 2014 4:15 pm
Hi Teitbite,

Thanks for your patience, all problems solved!
Now update to 3.0, party on!

Regards,

Pascal
User avatar
Gold Boarder

teitbite
Sun Dec 14, 2014 8:09 pm
Hi

Great to hear that. Please if You will have any new issues just start a new thread. This one got a little offtopic, so users may have problems got into the solutions we included here.
User avatar
Moderator


cron