Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ptibogxiv committed Oct 31, 2024
1 parent 413f8e0 commit ce6c076
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion blocks/membership/block.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function doliconnect_membership_render_block( $attributes ) {
if (isset($adherent->id) && $adherent->id > 0) $member_id = "member_id=".$adherent->id;
$morphy = '';

if (!empty($current_user->billing_type)) $morphy = "&sqlfilters=(t.morphy%3A=%3A'')%20or%20(t.morphy%3Ais%3Anull)%20or%20(t.morphy%3A%3D%3A'".$current_user->billing_type."')";
if (!empty($current_user->billing_type)) $morphy = "&sqlfilters=(t.morphy:=:'')or(t.morphy:is:null)or(t.morphy:=:'".$current_user->billing_type."')";
$request = "/adherentsplus/type?sortfield=t.libelle&sortorder=ASC&".$member_id.$morphy;
$typeadhesion = callDoliApi("GET", $request, null, dolidelay('member', esc_attr(isset($_GET["refresh"]) ? $_GET["refresh"] : null), true));

Expand Down
2 changes: 1 addition & 1 deletion blocks/product/blockdiscount.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function doliconnect_discountproduct_block_render( $attributes, $content) {
$date = new DateTime();
$date->modify('NOW');
$lastdate = $date->format('Y-m-d');
$request = "/discountprice?sortfield=t.rowid&sortorder=DESC&limit=5&sqlfilters=(t.date_begin%3A%3C%3D%3A'".$lastdate."')%20AND%20(t.date_end%3A%3E%3D%3A'".$lastdate."')%20AND%20(d.tosell%3A%3D%3A1)";
$request = "/discountprice?sortfield=t.rowid&sortorder=DESC&limit=5&sqlfilters=(t.date_begin:>=:'".$lastdate."')and(t.date_end:<=:'".$lastdate."')and(d.tosell:=:1)";
$resultats = callDoliApi("GET", $request, null, dolidelay('product', esc_attr(isset($_GET["refresh"]) ? $_GET["refresh"] : null)));
//print $resultatso;

Expand Down
2 changes: 1 addition & 1 deletion blocks/product/blocknew.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function doliconnect_newproduct_block_render( $attributes, $content) {
$duration = (!empty(get_option('dolicartnewlist'))?get_option('dolicartnewlist'):'month');
$date->modify('FIRST DAY OF LAST '.$duration.' MIDNIGHT');
$lastdate = $date->format('Y-m-d');
$request = "/products?sortfield=t.datec&sortorder=DESC&category=".doliconst("DOLICONNECT_CATSHOP")."&limit=5&sqlfilters=(t.datec%3A%3E%3A'".$lastdate."')%20AND%20(t.tosell%3A%3D%3A1)";
$request = "/products?sortfield=t.datec&sortorder=DESC&category=".doliconst("DOLICONNECT_CATSHOP")."&limit=5&sqlfilters=(t.datec:>=:'".$lastdate."')and(t.tosell:=:1)";
$resultats = callDoliApi("GET", $request, null, dolidelay('product', esc_attr(isset($_GET["refresh"]) ? $_GET["refresh"] : null)));
//print $resultatso;

Expand Down

0 comments on commit ce6c076

Please sign in to comment.