0

Using vQmod, I'm trying to add a condition to select only products which will be available at the current date (in order only these ones are displayed with the "Latest" native module).

I have tested with something like:

<search position="replace">
    <![CDATA[           'sort'  => 'p.date_added',
    ]]>
</search>
<add>
    <![CDATA[
     # Before the current date
     'sort'  => 'p.date_available <= NOW()',]]>
</add>

But it seems not to have any effect...

P. Mergey
  • 313
  • 4
  • 18
  • 'sort' is for sorting not for selecting. – DigitCart Jun 06 '18 at 16:23
  • You're right of course, I had to be overworked. :-\ So, the problem is to find how to modify the selection clause for this module. – P. Mergey Jun 07 '18 at 04:50
  • @P.Mergey You need to make changes in model function. Selection clause is not possible in controller. – Radhika Jun 07 '18 at 07:07
  • 1
    Latest module uses `getProducts` function, `getProducts` function uses `getProduct` and `getProduct` already has `p.date_available <= NOW()`, you don't need to add it again. – DigitCart Jun 07 '18 at 08:56
  • @DigitCart : Thank you for taking the time to explain the nesting of these functions. – P. Mergey Jun 11 '18 at 08:45

0 Answers0