[plugin] Simplier Cart Box

Messagepar stepibou » Ven 17 Fév 2006, 00:25

hello,

a shopping cart box whitch displays the number of products,
the total cart price, and the total weight.

available here : Simplier Cart Box


Thank you to report mistakes here.
--> osCSS inside <--
stepibou
Membre très actif
 
Messages: 274
Inscription: Dim 30 Oct 2005, 02:15
Localisation: Lyon

Messagepar sidarus » Ven 17 Fév 2006, 03:43

Never stop :P

[STICKY]
Dernière édition par sidarus le Jeu 27 Juil 2006, 21:01, édité 1 fois.
sidarus
Membre très actif
 
Messages: 396
Inscription: Mar 03 Mai 2005, 23:34
Localisation: Geneva (CH)

Messagepar nequaquam » Lun 20 Fév 2006, 07:52

Many thanks stepibou, it is exactly what I need. :D
_______________________________________________________________________________

Website: nequaquam
osCSS shop in development: pugnae
nequaquam
Membre actif
 
Messages: 48
Inscription: Mer 08 Fév 2006, 12:40
Localisation: Barcelona

Messagepar nequaquam » Lun 20 Fév 2006, 21:37

If you need change the size of each section change the following code:

Open catalogincludesboxesshopping_cart_short.php

Find:

Code: Tout sélectionner
  $cart_contents_string = '';
  if ($cart->count_contents() > 0) {
    $products = $cart->get_products();
    $total_nb_products_with_qty = 0;
    for ($i=0, $n=sizeof($products); $i<$n; $i++) {
          $total_nb_products_with_qty += $products[$i]['quantity'];
    }
    if ( $total_nb_products_with_qty == '1' ) {
          $cart_contents_string .= '<li><a href="'.tep_href_link(FILENAME_SHOPPING_CART).'">'. $total_nb_products_with_qty .' '.BOX_SHOPPING_CART_PRODUCTS_NB.'<br />'."n";
    } else {
          $cart_contents_string .= '<li><a href="'.tep_href_link(FILENAME_SHOPPING_CART).'">'. $total_nb_products_with_qty .' '.BOX_SHOPPING_CART_PRODUCTS_NBS.'<br />'."n";
    }
    $cart_contents_string .=  ''.BOX_SHOPPING_CART_TOTAL.' '.$currencies->format($cart->show_total()).'<br />'."n";
    $cart_contents_string .=  ''.BOX_SHOPPING_CART_WEIGHT.' '.$cart->show_weight().' Kg</a></li>'."n";
  } else {
    $cart_contents_string .= '<li>'.BOX_SHOPPING_CART_EMPTY.'</li>'."n";

Replace with:

Code: Tout sélectionner
  $cart_contents_string = '<div class="shopping_cart_short_quantity">';
  if ($cart->count_contents() > 0) {
    $products = $cart->get_products();
    $total_nb_products_with_qty = 0;
    for ($i=0, $n=sizeof($products); $i<$n; $i++) {
          $total_nb_products_with_qty += $products[$i]['quantity'];
    }
    if ( $total_nb_products_with_qty == '1' ) {
          $cart_contents_string .= '<li><a href="'.tep_href_link(FILENAME_SHOPPING_CART).'">'. $total_nb_products_with_qty .' '.BOX_SHOPPING_CART_PRODUCTS_NB.'<br />'."n";
    } else {
          $cart_contents_string .= '<li><a href="'.tep_href_link(FILENAME_SHOPPING_CART).'">'. $total_nb_products_with_qty .' '.BOX_SHOPPING_CART_PRODUCTS_NBS.'<br />'."n";
    }
    $cart_contents_string .=  '<div class="shopping_cart_short_total">'.BOX_SHOPPING_CART_TOTAL.' '.$currencies->format($cart->show_total()).'<br />'."n";
    $cart_contents_string .=  '<div class="shopping_cart_short_wheight">'.BOX_SHOPPING_CART_WEIGHT.' '.$cart->show_weight().' Kg</a></li>'."n";
  } else {
    $cart_contents_string .= '<div class="shopping_cart_short_empty"><li>'.BOX_SHOPPING_CART_EMPTY.'</li>'."n";

And later add to CSS.
Dernière édition par nequaquam le Lun 20 Fév 2006, 21:39, édité 1 fois.
_______________________________________________________________________________

Website: nequaquam
osCSS shop in development: pugnae
nequaquam
Membre actif
 
Messages: 48
Inscription: Mer 08 Fév 2006, 12:40
Localisation: Barcelona

Messagepar stepibou » Lun 20 Fév 2006, 21:48

Hello nequaquam,

Thank you for your code, and your contrib for the stocks...


Perhaps, it's better to put your div in your template.php file in your template.

D'ont forget to close your div :
By the end </div>

Continue this way, participation.

bye
;)
--> osCSS inside <--
stepibou
Membre très actif
 
Messages: 274
Inscription: Dim 30 Oct 2005, 02:15
Localisation: Lyon

Messagepar nequaquam » Lun 20 Fév 2006, 22:19

Hi stepibou,
the </div> are in my localhost installation, I don't know for that have not written them here, I've put the first version (I am not programmer, neither so at least amateur). The stocks contribution http://forums.oscss.org/viewtopic.php?id=229 can improve, if somebody knows as adding the stock image to the product info.
_______________________________________________________________________________

Website: nequaquam
osCSS shop in development: pugnae
nequaquam
Membre actif
 
Messages: 48
Inscription: Mer 08 Fév 2006, 12:40
Localisation: Barcelona

Messagepar j4k » Lun 20 Fév 2006, 22:29

I started to correct it and improve it (added to the product_info page) and added french translation
~ osCSS 1.2.1 ~
Avatar de l’utilisateur
j4k
Site Admin
 
Messages: 1259
Inscription: Mer 27 Avr 2005, 09:13
Localisation: France

Messagepar nequaquam » Lun 20 Fév 2006, 22:47

Fantastic! :D

The version that I used as base was : quantity image unlimited v1.0 (Release).
_______________________________________________________________________________

Website: nequaquam
osCSS shop in development: pugnae
nequaquam
Membre actif
 
Messages: 48
Inscription: Mer 08 Fév 2006, 12:40
Localisation: Barcelona

Messagepar stepibou » Lun 20 Fév 2006, 22:57

Yes !

this will make a good contribution!

To finish with my thinking of this : you can use this code better :
Code: Tout sélectionner
$cart_contents_string = '';
  if ($cart->count_contents() > 0) {
    $products = $cart->get_products();
    $total_nb_products_with_qty = 0;
    for ($i=0, $n=sizeof($products); $i<$n; $i++) {
          $total_nb_products_with_qty += $products[$i]['quantity'];
    }
    if ( $total_nb_products_with_qty == '1' ) {
          $cart_contents_string .= '<li><span class="shopping_cart_short_quantity"><a href="'.tep_href_link(FILENAME_SHOPPING_CART).'">'. $total_nb_products_with_qty .' '.BOX_SHOPPING_CART_PRODUCTS_NB.'<br />'."n";
    } else {
          $cart_contents_string .= '<li><span class="shopping_cart_short_quantity"><a href="'.tep_href_link(FILENAME_SHOPPING_CART).'">'. $total_nb_products_with_qty .' '.BOX_SHOPPING_CART_PRODUCTS_NBS.'<br />'."n";
    }
    $cart_contents_string .=  '</span><span class="shopping_cart_short_total">'.BOX_SHOPPING_CART_TOTAL.' '.$currencies->format($cart->show_total()).'<br />'."n";
    $cart_contents_string .=  '</span><span class="shopping_cart_short_wheight">'.BOX_SHOPPING_CART_WEIGHT.' '.$cart->show_weight().' Kg</a></span></li>'."n";
  } else {
    $cart_contents_string .= '<li><span class="shopping_cart_short_empty">'.BOX_SHOPPING_CART_EMPTY.'</span></li>'."n";

;)
--> osCSS inside <--
stepibou
Membre très actif
 
Messages: 274
Inscription: Dim 30 Oct 2005, 02:15
Localisation: Lyon

Messagepar nequaquam » Lun 20 Fév 2006, 23:18

This is the shopping cart of the store that I am building.

Image

Thank you again for the contribution stepibou. ;)
_______________________________________________________________________________

Website: nequaquam
osCSS shop in development: pugnae
nequaquam
Membre actif
 
Messages: 48
Inscription: Mer 08 Fév 2006, 12:40
Localisation: Barcelona

Messagepar sidarus » Mar 21 Fév 2006, 00:49

[SP] Joder ni me fije... un torero :D hole hole :D
sidarus
Membre très actif
 
Messages: 396
Inscription: Mar 03 Mai 2005, 23:34
Localisation: Geneva (CH)

Messagepar nequaquam » Mar 21 Fév 2006, 03:25

España cañí. España de toros, siesta y paella. No gracias.

( Pensándolo bien, la siesta y la paella no están tan mal, y el toro si es de Osborne y con mas de 10º tampoco me molesta). :D :D :D
_______________________________________________________________________________

Website: nequaquam
osCSS shop in development: pugnae
nequaquam
Membre actif
 
Messages: 48
Inscription: Mer 08 Fév 2006, 12:40
Localisation: Barcelona


Retourner vers Plugin

 


  • Articles en relation
    Réponses
    Vus
    Dernier message

Qui est en ligne

Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 1 invité

cron