Hello everyone. Using version 3.6.8
Recently, i noticed that not al products where shown in a category. Obviusly all product were published.
Debugging I found the SQL sentence and realized that one line was hiddin then results: 'AND (p.virtuemart_product_id NOT IN (here comes a list of ids)
Searching this in product model, line 715, if i comment this
$where[] = ' ( p.`virtuemart_product_id` NOT IN ('.implode(',',self::$_alreadyLoadedIds).') ) ';
results are ok. This line is comented with
Quote//This option switches between showing products without the selected language or only products with language.
but I don't know what it is supposed to.
What is that option? is it in configuration? I really don't want to override code
Thanks
anybody?
Thanks
in v3.2.2 this line (622) is comented with:
//and !VmConfig::get('prodOnlyWLang',false)
and in VM3.6.10.10211 ??
Same as 3.6.8
//This option switches between showing products without the selected language or only products with language.
if( $app->isSite() ){
if((empty($this->keyword) or $group !== FALSE) and self::$omitLoaded and self::$_alreadyLoadedIds){
$where[] = ' ( p.`virtuemart_product_id` NOT IN ('.implode(',',self::$_alreadyLoadedIds).') ) ';
}
}
VmConfig::get('omitLoaded',false)
where can I change $omitLoaded without overriding core?
https://docs.virtuemart.net/manual/general-concepts/206-hidden-configurations.html
add it to your config
Thanks but at line 715 $omitLoaded is overriden by another function
I've found omitLoaded is in category, database -> cat_params
Anybody Can explain me what is used for? And how to change it's value o virtuemart backend?
Thanks
Everything is already given.
VmConfig::get('omitLoaded',false)
This is basic PHP... It takes false as argument if omitLoaded is not already set.
As GJC pointed out:
https://docs.virtuemart.net/manual/general-concepts/206-hidden-configurations.html (https://docs.virtuemart.net/manual/general-concepts/206-hidden-configurations.html)
Read the doc and set it to true :)
Jörgen @ Kreativ Fotografi
Quote from: Jörgen on March 02, 2020, 22:09:12 PM
Everything is already given.
VmConfig::get('omitLoaded',false)
This is basic PHP... It takes false as argument if omitLoaded is not already set.
As GJC pointed out:
https://docs.virtuemart.net/manual/general-concepts/206-hidden-configurations.html (https://docs.virtuemart.net/manual/general-concepts/206-hidden-configurations.html)
Read the doc and set it to true :)
Jörgen @ Kreativ Fotografi
Sorry but omitLoaded is not declared in hidden configuration, like i said before.
List of hidden configuration:
[config]
##shop settings
shop_is_offline=0
offline_message=Our Shop is currently down for maintenance. Please check back again soon.
use_as_catalog=0
currency_converter_module=convertECB.php
order_mail_html=1
useSSL=0
dangeroustools=0
debug_enable=none
google_jquery=1
multix=none
##Shopfront
pdf_button_enable=1
show_emailfriend=1
show_printicon=0
show_out_of_stock_products=1
coupons_enable=0
show_uncat_child_products=0
coupons_default_expire=1,D
weight_unit_default=KG
lwh_unit_default=m
list_limit=20
showReviewFor=all
reviewMode=registered
showRatingFor=all
ratingMode=registered
reviews_autopublish=1
reviews_minimum_comment_length=100
reviews_maximum_comment_length=2000
vmtemplate=default
categorytemplate=default
showCategory=1
categorylayout=0
categories_per_row=3
productlayout=0
products_per_row=3
vmlayout=0
show_featured=1
featured_products_per_row=3
show_topTen=1
topten_products_per_row=3
show_recent=1
show_latest=1
##Paths
assets_general_path=components/com_virtuemart/assets/
media_category_path=images/stories/virtuemart/category/
media_product_path=images/stories/virtuemart/product/
media_manufacturer_path=images/stories/virtuemart/manufacturer/
media_vendor_path=images/stories/virtuemart/vendor/
forSale_path_thumb=images/stories/virtuemart/forSale/resized/
img_resize_enable=1
img_width=90
img_height=90
no_image_set=noimage.gif
no_image_found=warning.png
##Product order settings
browse_orderby_field=p.virtuemart_product_id
browse_orderby_fields=array:product_sku|category_name|mf_name|product_name
browse_search_fields=array:product_sku|category_name|category_description|mf_name|product_name|product_s_desc
##Pricing
show_prices=1
price_show_packaging_pricelabel=0
show_tax=1
basePrice=1
basePriceText=1
basePriceRounding=-1
variantModification=1
variantModificationText=1
variantModificationRounding=-1
basePriceVariant=1
basePriceVariantText=1
basePriceVariantRounding=-1
basePriceWithTax=1
basePriceWithTaxText=1
basePriceWithTaxRounding=-1
discountedPriceWithoutTax=1
discountedPriceWithoutTaxText=1
discountedPriceWithoutTaxRounding=-1
salesPriceWithDiscount=1
salesPriceWithDiscountText=1
salesPriceWithDiscountRounding=-1
salesPrice=1
salesPriceText=1
salesPriceRounding=-1
priceWithoutTax=1
priceWithoutTaxText=1
priceWithoutTaxRounding=-1
discountAmount=1
discountAmountText=1
discountAmountRounding=-1
taxAmount=1
taxAmountText=1
taxAmountRounding=-1
##Check stock
addtocart_popup=1
check_stock=0
automatic_payment=1
automatic_shipment=1
agree_to_tos_onorder=0
oncheckout_show_legal_info=1
oncheckout_show_register=1
oncheckout_show_steps=0
oncheckout_show_register_text=COM_VIRTUEMART_ONCHECKOUT_DEFAULT_TEXT_REGISTER
##SEO
seo_disabled=0
seo_translate=0
seo_use_id=0
you just add it!
Quote from: Jörgen on March 02, 2020, 22:09:12 PM
Everything is already given.
VmConfig::get('omitLoaded',false)
This is basic PHP... It takes false as argument if omitLoaded is not already set.
As GJC pointed out:
https://docs.virtuemart.net/manual/general-concepts/206-hidden-configurations.html (https://docs.virtuemart.net/manual/general-concepts/206-hidden-configurations.html)
Read the doc and set it to true :)
Jörgen @ Kreativ Fotografi
Quote from Link above, have You even read it ?
QuoteHow to use a hidden configuration parameter?
open the virtuemart.cfg (at /administrator/components/com_virtuemart/virtuemart.cfg)
Preset any value used in VmConfig::get('myvalue','default').
In the example, change the line myvalue=default to myvalue=mydefaultvalue
Save the file
Enter the virtuemart backend:
For VirtueMart 3: store the VirtueMart configuration once. The configuration file is load first and overwritten by the form of the configuration view and you should keep all settings.
For VirtueMart 2: you must use the button in tools "udpate config by file". Be aware that you loose your settings then.
Of course, you could theoretically set all config defaults into the virtuemart.cfg (interesting for retailers actually).
Jörgen @ Kreativ Fotografi