Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
ptibogxiv committed Nov 2, 2024
1 parent 5c8844b commit 498393f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dashboard/templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,7 @@ function dolicart_display($content) {
print "</div></div>";
} elseif ( defined("DOLIBUG") ) {
print dolibug((isset($object->error)?$object->error->message:null));
} elseif ( !doliCheckModules('commande', esc_attr(isset($_GET["refresh"]) ? $_GET["refresh"] : null)) ) {
} elseif ( !doliCheckModules('commande') ) {

print "<div class='card shadow-sm'><div class='card-body'>";
print dolibug(__( "Oops, Order's module is not available", "doliconnect"));
Expand Down
2 changes: 1 addition & 1 deletion functions/product.php
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ function doliProductCart($product, $line = null, $refresh = null, $wishlist = tr
$button .= '<input id="qty-prod-'.$product->id.'" type="text" class="form-control form-control-sm" value="'.__( 'Linked item', 'doliconnect').'" aria-label="'.__( 'Linked item', 'doliconnect').'" style="text-align:center;" disabled readonly>';
} elseif ( $mstock['stock'] <= 0 || $mstock['m2'] < $mstock['step'] ) {
$button .= '<input id="qty-prod-'.$product->id.'" type="text" class="form-control form-control-sm" value="'.__( 'Unavailable', 'doliconnect').'" aria-label="'.__( 'Unavailable', 'doliconnect').'" style="text-align:center;" disabled readonly>';
} elseif (doliCheckModules('adherent', $refresh) && $product->id == doliconst("ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS")) {
} elseif (doliCheckModules('adherent') && $product->id == doliconst("ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS")) {
$button .= '<div class="btn-group" role="group" aria-label="Basic example">';
if (!empty($mstock['qty'])) {
$button .= "<button class='btn btn-sm btn-dark' name='delete' value='delete' type='submit' onclick='doliJavaCartAction(\"updateLine\", ".$product->id.", ".$mstock['lineid'].", 0, ".json_encode($linearray_options, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES).", \"delete\");'><i class='fa-solid fa-trash-can'></i></button>";
Expand Down
4 changes: 2 additions & 2 deletions functions/tools.php
Original file line number Diff line number Diff line change
Expand Up @@ -1765,7 +1765,7 @@ function doliline($object, $refresh = false, $refreshstock = false, $wishlist =
$dates = " <i>(Du $start au $end)</i>";
}
$doliline .= '<div class="w-100 justify-content-between"><div class="row"><div class="d-none d-sm-block col-sm-2 col-lg-1"><center>';
if ( doliCheckModules('fraisdeport', $refresh) && doliconst('FRAIS_DE_PORT_ID_SERVICE_TO_USE', $refresh) == $line->fk_product ) {
if ( doliCheckModules('fraisdeport') && doliconst('FRAIS_DE_PORT_ID_SERVICE_TO_USE', $refresh) == $line->fk_product ) {
$doliline .= '<i class="fas fa-shipping-fast fa-2x fa-fw"></i>';
} else {
$doliline .= doliconnect_image('product', $line->fk_product, array('limit'=>1, 'size'=>'50x50'), $refresh);
Expand Down Expand Up @@ -1798,7 +1798,7 @@ function doliline($object, $refresh = false, $refreshstock = false, $wishlist =
}
}
$doliline .= '</div><div class="col-4 col-sm-3 col-md-3 col-lg-3 text-end"><h6 class="mb-1">'.doliprice($line, (empty(get_option('dolibarr_b2bmode'))?'total_ttc':'total_ht'), isset($line->multicurrency_code) ? $line->multicurrency_code : null).'</h6>';
if (!empty($line->fk_parent_line) || (doliCheckModules('fraisdeport', $refresh) && empty($line->fk_parent_line) && doliconst('FRAIS_DE_PORT_ID_SERVICE_TO_USE') == $line->fk_product)) {
if (!empty($line->fk_parent_line) || (doliCheckModules('fraisdeport') && empty($line->fk_parent_line) && doliconst('FRAIS_DE_PORT_ID_SERVICE_TO_USE') == $line->fk_product)) {
$doliline .= '<h6 class="mb-1">x'.$line->qty.'</h6>';
} elseif ( isset($object->statut) && empty($object->statut) && !is_page(doliconnectid('doliaccount')) ) {
$doliline .= doliProductCart($product, $line, $refresh, $wishlist);
Expand Down

0 comments on commit 498393f

Please sign in to comment.