Skip to main content

price selection doesn't work after update?

More
10 years 11 months ago - 10 years 11 months ago #2367 by sidewind
Hey all,

On my site the price selection module I use doesn't show up any more!!
This happened after i updated the component to the latest version 2.5.1744.
Does anyone have the same problem?

I use a custom layout for the module but this worked before with no problems.

Thank you.

Greetz,

Sander.

edit: I use the layout given by Bram

Joomla versie: 2.5.28 & 3.4.3
Datafeed component versie: 2.5.2038 & 3.1.2072

www.kledingstunts.nl
www.bestelsuperdeals.nl

test shop: test.superdeals-online.nl
Last edit: 10 years 11 months ago by sidewind. Reason: more info

Please Log in to join the conversation.

More
10 years 11 months ago #2368 by redactie
Try removing the wrapping function in the module layout

maybe I removed some legacy code too soon

Please Log in to join the conversation.

More
10 years 11 months ago - 10 years 11 months ago #2369 by sidewind
Bram,

This is the code I use for the price selection layout:
Code:
<?php // no direct access # # Copyright brambring.nl # https://www.affiliatefeeds.nl # joomla@brambring.nl # # file modules/mod_datamenu/tmpl/minmaxb_custom.php defined( '_JEXEC' ) or die( 'Restricted access' ); function Dataminmaxb_customMenu(&$dataitems,&$params) { $baselink=$params->get( 'baselink', '' ); for ($v=1;$v<=9;$v++) { if ($x=$params->get("q$v",'')) { $baselink .="&q$v=".urlencode($x); } } if ($x=$params->get("q",'')) { $baselink .="&q=".urlencode($x); } # this script is a template modify it for your needs. # if you want the price out of the SEF url create a custom router.php # array price steps $p=array(50,75,100,200,300,400,500,600,800,1000,1250,1500,1750,2000,2500,3000); $dataitems=modDatamenuHelper::getMinMax($params); $min=$dataitems[0]['min']; $max=$dataitems[0]['max']; if ( $min >= $max ) { return; } ?> <!--<div class="module">--> <div class="bg_div shadow menu"> <?php $r=false; $seltext='Filteren op prijs'; #print '</br>'; print '<div class="cat-blok-titel" >'.$seltext.'</div>'; print '<div class="submenu-scroll scrollbar-style"><div class="submenu"><ul>'; $q10=$params->get('q10'); $q11=$params->get('q11'); # base string for the remove link. You can use a.remove for CSS $remove= '<li><div class="checkbox checked"><a class="verwijder" href="'.JRoute::_($baselink).'">%s</a></div></li>'; if ( $p[0] > $min ) { # string for 'Up to price range' $s='Tot '.$p[0].' Euro'; if ( (0==$q10) && ($p[0]==$q11) ) { printf ($remove,$s); $r=true; } else { print '<li><div class="checkbox"><a href="'.JRoute::_($baselink.'&q11='.$p[0]).'" title="'.$s.'">'.$s.'</a></div></li>'; } } for ( $i=1;$i<count($p);$i++ ) { if ( $p[$i] < $min ) continue; if ( $p[$i-1] > $max ) continue; # string for 'From To price range' $s='Van '.$p[$i-1].' tot '. $p[$i] .' Euro'; if ( ($p[$i-1]==$q10) && ($p[$i]==$q11) ) { printf ($remove,$s); $r=true; } else { print '<li><div class="checkbox"><a href="'.JRoute::_($baselink.'&q10='.$p[$i-1].'&q11='.$p[$i]).'" title="'.$s.'">'.$s.'</a></div></li>'; } } if ( $p[$i-1] < $max ) { # string for 'From price range' $s='Vanaf '.$p[$i-1].' Euro'; if ( (0==$q11) && ($p[$i-1]==$q10) ) { printf ($remove,$s); $r=true; } else { print '<li><div class="checkbox"><a href="'.JRoute::_($baselink.'&q10='.$p[$i-1]).'" title="'.$s.'">'.$s.'</a></div></li>'; } } if ( $r=false AND ($q10 != 0 || $q11!= 0 )) { #Fail save printf ($remove,'[X] Filter');; } print "</ul></div></div></div>"; }
Can you please tell me what to change? Thank you.

Greetz,

Sander.

Joomla versie: 2.5.28 & 3.4.3
Datafeed component versie: 2.5.2038 & 3.1.2072

www.kledingstunts.nl
www.bestelsuperdeals.nl

test shop: test.superdeals-online.nl
Last edit: 10 years 11 months ago by sidewind. Reason: typo

Please Log in to join the conversation.

More
10 years 11 months ago #2371 by redactie
remove the wrapper
Code:
function Dataminmaxb_customMenu(&$dataitems,&$params) { }

Please Log in to join the conversation.

More
10 years 11 months ago #2373 by sidewind
Bram,

After updating to the latest 2.5.1753 it works again.

It works now with the wrapper. Should I still remove it for future changes?
What do you say?

Greetz,

Sander.

Joomla versie: 2.5.28 & 3.4.3
Datafeed component versie: 2.5.2038 & 3.1.2072

www.kledingstunts.nl
www.bestelsuperdeals.nl

test shop: test.superdeals-online.nl

Please Log in to join the conversation.

More
10 years 11 months ago - 10 years 11 months ago #2383 by redactie
the function wrapper is not needed anymore, however I will leave the backward-compatibility code in 2.5
Last edit: 10 years 11 months ago by redactie.
The following user(s) said Thank You: sidewind

Please Log in to join the conversation.

Time to create page: 0.560 seconds