Forum


Advisor Suggestions

Help us to make a better extension !
Forums
No se permite escribir sin estar logado. Por favor, login

Show only VM-Mainproducts 21.08.2014 06:34

Hi,

soon I will activate about 4000 VirtueMart-Products - and the creation of Advisor-Solutions will be hell on earth

Most of my VirtueMart-Products are main-products with variants - and it would be great if it is possible to hide the variant-products.

I think it is easy for you to hide them, because you can check it very easy in the database if it is a variant of an other product:

when

in table "virtuemart_products"
field "product_parent_id" > 0

it is a variant an could be hidden.

Re: Show only VM-Mainproducts 21.08.2014 10:50

Hi,
in fact, we don't use datbase querys to recover VM products list, in order to keep compatibility with new releases of VM we profit from its model class. For introducing such filters you should add some conditions to the VM filter, at this point of the code:

JOOMLA\administrator\components\com_advisor\views\solution\view.html.php

about line 54

$productModel = VmModel::getModel('Product');

[HERE YOU CAN ADD FILTERS]

$virtueproducts=$productModel->getProductListing();


In order to discard products with parent_id:

$productModel->product_parent_id="1-1";

In order to force the list display ordered by product name:

$productModel->filter_order = 'product_name';

In order to set asc/desc order:

$productModel->filter_order_Dir='ASC';

$productModel->filter_order_Dir='DESC';


Finally, if you want to show on the list published AND unpublished virtuemart products, you can change the line

$virtueproducts=$productModel->getProductListing();

for

$virtueproducts=$productModel->getProductListing(FALSE,FALSE,TRUE,FALSE);



This preferences are very specific for each case/site, so you can include the preferred configuration for your own needs.

Hope this helps, regards
Moonsoft Team
www.moonsoft.es

Re: Show only VM-Mainproducts 21.08.2014 11:25

It works!

...and now there are the missing products (see ticket) listed too.

I think, you should implement these parts to be configured in the settings of Advisor in further releases, so anybody can change them without editing within the code.

But regardless of that: Thank you for your good - and very fast - support!

Re: Show only VM-Mainproducts 21.08.2014 11:33

Ok, great, we'll close the ticket with this solution as well. You're right, the proper way to configure parameters should be the backend, but the problem with these specific settings is they are dependant on VM implementation. We can't be sure they will be the same or if they will be available at all in future versions of VM..before including new parameters in an official release we'll have to be sure how we are going to deal with possible changes in the future, and search for equivalent functions for hika shop as well.

Thanks for the feedback!

Regards
Moonsoft Team
www.moonsoft.es
Are you satisfied with our products/services/support?
Please help us to keep improving, add a review at  joomla extensions site and  magento connect

Lo que nuestros clientes opinan de nosotros