Author Topic: featured VirtueMart Products module  (Read 4748 times)

tonnick

  • Beginner
  • *
  • Posts: 8
featured VirtueMart Products module
« on: December 18, 2014, 20:17:44 pm »
Hello

If I'm not wrong, the module VirtueMart Products displaying the feature products show randomly the products. maybe I'm wrong but I did not find in forum how to change that. As far as I see, there is no option to change that.

how can we sort featured products by SKU ir ID for exemple ? thx for your help !

tonnick

  • Beginner
  • *
  • Posts: 8
Re: featured VirtueMart Products module
« Reply #1 on: December 24, 2014, 12:22:54 pm »
hello

any idea about it ? Am I wrong somewhere ?

tonnick

  • Beginner
  • *
  • Posts: 8
Re: featured VirtueMart Products module
« Reply #2 on: December 30, 2014, 11:04:27 am »
hello

nobody from virtuemart team here ? :'(

CasperH

  • Beginner
  • *
  • Posts: 13
Re: featured VirtueMart Products module
« Reply #3 on: January 03, 2015, 16:48:58 pm »
I made another topic just now, basically asking the same thing, but I think I'm halfway there.

http://forum.virtuemart.net/index.php?topic=127530.0

In your case, you can probably just use this extension: http://extensions.joomla.org/extensions/extension/extension-specific/virtuemart-extensions/extended-products-for-virtuemart by using the filter product ID setting.

Owh.. I realise, in combination with MetaMod I could probably also use that extension, haha. Problem solved?  ;D

Edit*

Or this one: http://codeboxr.com/product/virtuemart-product-display-for-joomla

tonnick

  • Beginner
  • *
  • Posts: 8
Re: featured VirtueMart Products module
« Reply #4 on: January 14, 2015, 09:22:14 am »
Well, I try to display the featured product, but not in random order ! I don't know why it seems that virtemart team choose to display featured in random order without other option :(

all the module that I found are not related to featured product :( I'm still stuck here, and no reply from virtuemart team about that ! this is quite disappointing...

tonnick

  • Beginner
  • *
  • Posts: 8
Re: featured VirtueMart Products module
« Reply #5 on: January 14, 2015, 11:31:53 am »
Finally, thx to this post : http://forum.virtuemart.net/index.php?topic=119323.msg405835#msg405835

I made a little hack
in administrator/components/com_virtuemart/models/product.php

around line 406, after :
Code: [Select]
$latest_products_days = VmConfig::get ('latest_products_days', 7);
$latest_products_orderBy = VmConfig::get ('latest_products_orderBy','created_on');

add :
Code: [Select]
$product_sku_orderBy = VmConfig::get ('product_sku_orderBy','product_sku');


and around line 411,

Code: [Select]
case 'featured':
$where[] = 'p.`product_special`="1" ';
$orderBy = 'ORDER BY RAND()';
break;
               

replaced by

Code: [Select]
case 'featured':
$where[] = 'p.`product_special`="1" ';
$orderBy = 'ORDER BY p.`' . $product_sku_orderBy . '`';
$this->filter_order_Dir = 'DESC';
break;

Note: I'm on a quite old version of virtuemart, not sure that this can be applied on latest 3.x, and in my opinion, this is not a real solution. Virtuemart team should improve the way of displaying product in this module.

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 26091
  • Always on vacation
    • Jenkin Hill Internet
Re: featured VirtueMart Products module
« Reply #6 on: January 14, 2015, 12:36:26 pm »
Don't know what you mean by "team". We have a very small number of program developers and a few user volunteers.  Somewhat naturally the devs are now concentrating on the VM3 core.

VirtueMart is a project in which all users can contribute. Extended module function has always been an area where third party developers have contributed, hence the relatively large number of minicart, scroller, products anywhere and similar modules currently available, most for a small charge, some for free.  I do not recall anyone else asking for what you seem to require, which is additional product filtering within a module? If you believe there is a market for this then why not develop it further yourself (or hire an experienced coder) and release it for use by any others that may require such function, or donate it to the project.
Kelvyn

Jenkin Hill Internet,
Keswick, Lake District

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VM3.2.3.9614 on Joomla 3.7.4 PHP 7.0.22

Testing VM3.2.3.9614 on J!3.7.4

tonnick

  • Beginner
  • *
  • Posts: 8
Re: featured VirtueMart Products module
« Reply #7 on: January 15, 2015, 09:42:35 am »
if you have a quick look on forum, you'll see a lot of people asking why ordering using featured product is in random mode ! and if you search as well, you'll see that noboby gave a clear answer.

I understand that the people behind virtuemart (this is what I call a team) is looking for V3, but, as least some answer should be provided. why did they choose to order by random the featured products ?! filtering tools is not enough, a lot of people shout it on forum. So I hope this little hack will help people, but usually, hacking source code of a component is not a good practice. and the people behind virtuemart should answer cleary about that. A great job has been done, there is no doubt about it. So just maybe some clarification would be great at some point about the options chosen to make it work ;)

mhshakouri

  • Beginner
  • *
  • Posts: 8
    • Site123.ir Web Design
  • VirtueMart Version: 3
Re: featured VirtueMart Products module
« Reply #8 on: January 15, 2015, 10:43:58 am »
Well as a supporter of virtuemart, the team you say and a few people they say, they are, great people doing great job.
I think you folks having problems with virtuemart default shipped modules, should do something about your needs. I'm sure there is plenty of free and payed extensions out there, and as one of the team members said, if you can't find it, fork it!
Make an extension for your needs.
In my recent projects, Since VM 2.9 beta, I choose to migrate to the latest version, and the result was that in my country, Iran, I was the first one to release a Payment Plugin for VM3 and I also managed to develop some slider, scroller, carousel, and so many other modules.
So the answer to your question is,
RANDOM FEATURED PRoducts is a must, in my opinion! It's so usefull when you have aroun 40 featured products and you want a random slideshow of 10 on each visit!
So I think instead of asking nonsense question On why You did this, why not that, Just Engage your self to the project!
I mean if you really don wanna contribute to the project and donate your extensions too, just go deep in to their codes. See how clearly coded they have coded the applications and how it's easy for you to get what you need out of the default shipped files. Even if you do not have enough php knowledge you still can do what you want around with virtuemart. That's been my experience since 6 years ago with VM!
Site123.ir

creatifpresence

  • Beginner
  • *
  • Posts: 13
  • A beginner
Re: featured VirtueMart Products module
« Reply #9 on: December 21, 2016, 02:04:05 am »
@tonnick - Brilliant, thank you for your hack it worked lovely.

Can this not be changed in core virtuemart? as it makes more sense than random :)