petites améliorations

Messagepar steph68 » Jeu 10 Juin 2010, 15:43

salut,

j'ai du faire des modifs pour des besoins spécifiques sur mes sites oscss. (en v1.2.1 encore)

du coup, j'ai amélioré quelques classes, comme shopping_cart.php, order.php ...

en voici quelques unes, en espérant que ça peut servir à d'autres:

shopping_cart.php:
Code: Tout sélectionner
<?php

 class shoppingCart
  {
   var $contents, $total, $weight, $cartID, $content_type;

   function shoppingCart()
   {
     $this->reset();
   }

   function restore_contents()
   {
     global $customer_id;

      if (!tep_session_is_registered('customer_id'))
        return false;

     // update quantity for products already in cart
     $rowset = tep_db_query('SELECT products_id FROM ' . TABLE_CUSTOMERS_BASKET . ' WHERE customers_id = ' . (int)$customer_id);
     while ($row = tep_db_fetch_array($rowset))
      {
       if (isset($this->contents[$row['products_id']]))
        {
         tep_db_query('UPDATE ' . TABLE_CUSTOMERS_BASKET . ' SET customers_basket_quantity = customers_basket_quantity + ' . (int)$this->contents[$row['products_id']]['qty'] . ' WHERE customers_id = ' . (int)$customer_id . ' AND products_id = '' . tep_db_input($row['products_id']) . ''');
          unset($this->contents[$row['products_id']]);
        }
     }

     unset($rowset, $row);

     // insert current cart contents in database
     $sql_products = '';
     $sql_attributes = '';

     foreach ($this->contents as $products_id => $product)
     {
       $sql_products .= '(' . (int)$customer_id . ', '' . tep_db_input($products_id) . '', ' . (int)$product['qty'] . ', NOW()), ';
        if (isset($product['attributes']))
          foreach ($product['attributes'] as $option => $value)
           $sql_attributes .= '(' . (int)$customer_id . ', '' . tep_db_input($products_id) . '', ' . (int)$option . ', ' . (int)$value . '), ';
      }

     if (strlen($sql_products))
      {
       tep_db_query('INSERT INTO ' . TABLE_CUSTOMERS_BASKET . ' (customers_id, products_id, customers_basket_quantity, customers_basket_date_added) VALUES ' . substr($sql_products, 0, -2));
        if (strlen($sql_attributes))
          tep_db_query('INSERT INTO ' . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . ' (customers_id, products_id, products_options_id, products_options_value_id) VALUES ' . substr($sql_attributes, 0, -2));
     }

     unset($sql_products, $sql_attributes);

      // reset per-session cart contents, but not the database contents
     $this->reset();

     // load cart products from database
     $rowset = tep_db_query('SELECT products_id, customers_basket_quantity FROM ' . TABLE_CUSTOMERS_BASKET . ' WHERE customers_id = ' . (int)$customer_id . ' ORDER BY customers_basket_id');
      while ($row = tep_db_fetch_array($rowset))
        $this->contents[$row['products_id']] = array('qty' => $row['customers_basket_quantity']);

     unset($rowset, $row);

     // load cart attributes from database
     $rowset = tep_db_query('SELECT products_id, products_options_id, products_options_value_id FROM ' . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . ' WHERE customers_id = ' . (int)$customer_id . ' ORDER BY customers_basket_attributes_id');
     while ($row = tep_db_fetch_array($rowset))
        if (isset($this->contents[$row['products_id']]))
          $this->contents[$row['products_id']]['attributes'][$row['products_options_id']] = $row['products_options_value_id'];

      unset($rowset, $row);

     $this->cleanup();
   }

   function reset($reset_database = false)
   {
     global $customer_id;

      $this->contents = array();
      $this->total = 0;
     $this->weight = 0;
      $this->content_type = false;

      if ($reset_database && tep_session_is_registered('customer_id'))
      {
       tep_db_query('DELETE FROM ' . TABLE_CUSTOMERS_BASKET . ' WHERE customers_id = ' . (int)$customer_id);
       tep_db_query('DELETE FROM ' . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . ' WHERE customers_id = ' . (int)$customer_id);
      }

     unset($this->cartID);
     if (tep_session_is_registered('cartID'))
        tep_session_unregister('cartID');
   }

   function add_cart($products_id, $qty = '1', $attributes = '', $notify = true)
   {
     global $new_products_id_in_cart, $customer_id;

      $products_id_string = tep_get_uprid($products_id, $attributes);
     $products_id = tep_get_prid($products_id_string);

     if (is_numeric($products_id) && is_numeric($qty))
     {
       $check_product_query = tep_db_query('SELECT products_status FROM ' . TABLE_PRODUCTS . ' WHERE products_id = ' . (int)$products_id);
       $check_product = tep_db_fetch_array($check_product_query);

        if ($check_product !== false && $check_product['products_status'] == '1')
       {
         if ($notify)
          {
           $new_products_id_in_cart = $products_id;
            tep_session_register('new_products_id_in_cart');
          }

         if (!$this->in_cart($products_id_string))
         {
           $this->contents[$products_id_string] = array('qty' => $qty);

            // insert into database
           if (tep_session_is_registered('customer_id'))
             tep_db_query('INSERT INTO ' . TABLE_CUSTOMERS_BASKET . ' (customers_id, products_id, customers_basket_quantity, customers_basket_date_added) VALUES (' . (int)$customer_id . ', '' . tep_db_input($products_id_string) . '', ' . (int)$qty . ', NOW())');

           if (is_array($attributes))
            {
             $sql = '';

              foreach ($attributes as $option => $value)
              {
               if (is_numeric($option) && is_numeric($value))
                {
                 $this->contents[$products_id_string]['attributes'][(int)$option] = (int)$value;
                 if (tep_session_is_registered('customer_id'))
                   $sql .= '(' . (int)$customer_id . ', '' . tep_db_input($products_id_string) . '', ' . (int)$option . ', ' . (int)$value . '), ';
                }
             }

             if (tep_session_is_registered('customer_id') && strlen($sql))
               tep_db_query('INSERT INTO ' . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . ' (customers_id, products_id, products_options_id, products_options_value_id) VALUES ' . substr($sql, 0, -2));

              unset($sql);
            }
         }
         else
          {
           $this->contents[$products_id_string]['qty'] = $qty;

           if (tep_session_is_registered('customer_id'))
             tep_db_query('UPDATE ' . TABLE_CUSTOMERS_BASKET . ' SET customers_basket_quantity = ' . (int)$quantity . ' WHERE customers_id = ' . (int)$customer_id . ' AND products_id = '' . tep_db_input($products_id_string) . ''');
          }

         $this->cleanup();

         // assign a temporary unique ID to the order contents to prevent hack attempts during the checkout procedure
          $this->cartID = $this->generate_cart_id();
        }
     }
   }

   function cleanup()
    {
     $deleted = array();

     foreach ($this->contents as $key => $product)
       if ($product['qty'] < 1)
        {
         unset($this->contents[$key]);
         $deleted[] = $key;
        }

     if (count($deleted) && tep_session_is_registered('customer_id'))
      {
       global $customer_id;

        foreach ($deleted as $key => $val)
          $deleted[$key] = ''' . tep_db_input($val) . ''';

        tep_db_query('DELETE FROM ' . TABLE_CUSTOMERS_BASKET . ' WHERE customers_id = ' . (int)$customer_id . ' AND products_id IN (' . implode(', ', $deleted) . ')');
       tep_db_query('DELETE FROM ' . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . ' WHERE customers_id = ' . (int)$customer_id . ' AND products_id IN (' . implode(', ', $deleted) . ')');
      }
   }

   function count_contents()
   {
     // get total number of items in cart
      $total_items = 0;

     foreach ($this->contents as $product)
       $total_items += $product['qty'];

      return $total_items;
    }

   function get_quantity($products_id)
   {
     return isset($this->contents[$products_id]) ? $this->contents[$products_id]['qty'] : 0;
   }

   function in_cart($products_id)
    {
     return isset($this->contents[$products_id]);
    }

   function remove($products_id)
   {
     global $customer_id;

      unset($this->contents[$products_id]);

     // remove from database
     if (tep_session_is_registered('customer_id'))
     {
       tep_db_query('DELETE FROM ' . TABLE_CUSTOMERS_BASKET . ' WHERE customers_id = ' . (int)$customer_id . ' AND products_id = '' . tep_db_input($products_id) . ''');
       tep_db_query('DELETE FROM ' . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . ' WHERE customers_id = ' . (int)$customer_id . ' AND products_id = '' . tep_db_input($products_id) . ''');
      }

     // assign a temporary unique ID to the order contents to prevent hack attempts during the checkout procedure
      $this->cartID = $this->generate_cart_id();
    }

   function remove_all()
   {
     $this->reset();
   }

   function get_product_id_list()
    {
     return implode(', ', array_unique(array_map('intval', array_keys($this->contents))));
   }

   function calculate()
    {
     $this->total = 0;
     $this->weight = 0;

      if (count($this->contents))
     {
       $products = array();

        $rowset = tep_db_query('SELECT p.products_id, IFNULL(s.specials_new_products_price, p.products_price) AS products_price, p.products_tax_class_id, p.products_weight FROM ' . TABLE_PRODUCTS . ' AS p LEFT JOIN ' . TABLE_SPECIALS . ' AS s ON (p.products_id = s.products_id AND s.status = 1) WHERE p.products_id IN (' . $this->get_product_id_list() . ')');
       while ($row = tep_db_fetch_array($rowset))
          $products[(int)$row['products_id']] = $row;

       unset($rowset, $row);

       foreach ($this->contents as $products_id => $product)
       {
         if (isset($products[(int)$products_id]))
          {
           $product_info = &$products[(int)$products_id];
            $this->total += tep_add_tax(  ($product_info['products_price'] + $this->attributes_price($products_id)) * $product['qty'],
                            tep_get_tax_rate($product_info['products_tax_class_id'])  );
            $this->weight += $product_info['products_weight'] * $product['qty'];
          }
       }
     }
   }

   function attributes_price($products_id)
   {
     $attributes_price = 0;

      if (isset($this->contents[$products_id]['attributes']))
     {
       $sql = '';

        foreach ($this->contents[$products_id]['attributes'] as $option => $value)
          $sql .= 'ROW(' . (int)$option . ', ' . (int)$value . '), ';

       if (strlen($sql))
       {
         $rowset = tep_db_query('SELECT SUM(IF(price_prefix = '+', options_values_price, -options_values_price)) AS price FROM ' . TABLE_PRODUCTS_ATTRIBUTES . ' WHERE products_id = ' . (int)$products_id . ' AND ROW(options_id, options_values_id) IN (' . substr($sql, 0, -2) . ')');
          $row = tep_db_fetch_array($rowset);
         return $row['price'];
       }
     }

     return 0;
   }

   function get_products()
   {
     global $languages_id;

     $products_array = array();

      if (count($this->contents))
     {
       $products = array();

        $rowset = tep_db_query('SELECT p.products_id, pd.products_name, p.products_model, p.products_image, IFNULL(s.specials_new_products_price, p.products_price) AS products_price, p.products_tax_class_id, p.products_weight FROM ' . TABLE_PRODUCTS . ' AS p INNER JOIN ' . TABLE_PRODUCTS_DESCRIPTION . ' AS pd ON (p.products_id = pd.products_id AND pd.language_id = ' . (int)$languages_id . ') LEFT JOIN ' . TABLE_SPECIALS . ' AS s ON (p.products_id = s.products_id AND s.status = 1) WHERE p.products_id IN (' . $this->get_product_id_list() . ')');
       while ($row = tep_db_fetch_array($rowset))
          $products[(int)$row['products_id']] = $row;

       foreach ($this->contents as $products_id => $product)
       {
         if (isset($products[(int)$products_id]))
          {
           $product_info = &$products[(int)$products_id];
            $products_array[] = array(  'id'      => $products_id,
                          'name'      => $product_info['products_name'],
                          'model'     => $product_info['products_model'],
                         'image'     => $product_info['products_image'],
                         'price'     => $product_info['products_price'],
                         'quantity'    => $product['qty'],
                         'weight'    => $product_info['products_weight'],
                          'final_price' => $product_info['products_price'] + $this->attributes_price($products_id),
                         'tax_class_id'  => $product_info['products_tax_class_id'],
                          'attributes'  => isset($product['attributes']) ? $product['attributes'] : ''  );
          }
       }
     }

     return $products_array;
   }

   function show_total()
   {
     $this->calculate();
     return $this->total;
    }

   function show_weight()
    {
     $this->calculate();
     return $this->weight;
   }

   function generate_cart_id($length = 5)
    {
     return tep_create_random_value($length, 'digits');
    }

   function get_content_type()
   {
     $this->content_type = false;

      if (DOWNLOAD_ENABLED == 'true' && $this->count_contents() > 0)
      {
       reset($this->contents);
       while (list($products_id, ) = each($this->contents))
        {
         if (isset($this->contents[$products_id]['attributes']))
         {
           reset($this->contents[$products_id]['attributes']);
           while (list(, $value) = each($this->contents[$products_id]['attributes']))
            {
             $virtual_check_query = tep_db_query('SELECT COUNT(*) AS total FROM ' . TABLE_PRODUCTS_ATTRIBUTES . ' pa, ' . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . ' pad WHERE pa.products_id = ' . (int)$products_id . ' AND pa.options_values_id = ' . (int)$value . ' AND pa.products_attributes_id = pad.products_attributes_id');
             $virtual_check = tep_db_fetch_array($virtual_check_query);

              if ($virtual_check['total'] > 0)
              {
               switch ($this->content_type)
                {
                 case 'physical':
                  {
                   return $this->content_type = 'mixed';
                 }
                 default:
                  {
                   $this->content_type = 'virtual';
                    break;
                  }
               }
             }
             else
              {
               switch ($this->content_type)
                {
                 case 'virtual':
                 {
                   return $this->content_type = 'mixed';
                 }
                 default:
                  {
                   $this->content_type = 'physical';
                   break;
                  }
               }
             }
           }
         }
         else
          {
           switch ($this->content_type)
            {
             case 'virtual':
             {
               return $this->content_type = 'mixed';
             }
             default:
              {
               $this->content_type = 'physical';
               break;
              }
           }
         }
       }
     }
     else
      {
       $this->content_type = 'physical';
     }

     return $this->content_type;
   }

   function unserialize($broken)
   {
     for(reset($broken);$kv=each($broken);)
      {
       $key=$kv['key'];
        if (gettype($this->$key)!="user function")
          $this->$key=$kv['value'];
     }
   }
 }

?>

ça ne change pas le comportement de la classe, les requêtes à la bdd sont juste minimisées et le code est plus lisible ...
steph68
Membre actif
 
Messages: 17
Inscription: Sam 01 Aoû 2009, 12:25

Messagepar steph68 » Jeu 10 Juin 2010, 15:45

order.php:

Code: Tout sélectionner
<?php

  class order
 {
   var $info, $totals, $products, $customer, $delivery, $content_type;

   function order($order_id = '')
    {
     $this->info = array();
      $this->totals = array();
      $this->products = array();
      $this->customer = array();
      $this->delivery = array();

      if (!tep_not_null($order_id))
     {
// >>> BEGIN REGISTER_GLOBALS
        link_post_variable('cc_type');
       link_post_variable('cc_owner');
        link_post_variable('cc_number');
       link_post_variable('cc_expires');
        link_post_variable('comments');
// <<< END REGISTER_GLOBALS
       $this->cart();
      }
     else
        $this->query($order_id);
    }

   function query($order_id)
   {
     global $languages_id;

     $order_id = tep_db_prepare_input($order_id);

      $order_query = tep_db_query(  'SELECT customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id,' .
                      ' delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id,' .
                     ' billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id,' .
                      ' payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified' .
                     ' FROM ' . TABLE_ORDERS . ' WHERE orders_id = ' . (int)$order_id  );

      $order = tep_db_fetch_array($order_query);

      $total = '';
      $shipping_method = '';

      $totals_query = tep_db_query('SELECT class, title, text FROM ' . TABLE_ORDERS_TOTAL . ' WHERE orders_id = ' . (int)$order_id . ' ORDER BY sort_order');
     while ($totals = tep_db_fetch_array($totals_query))
     {
       switch ($totals['class'])
       {
         case 'ot_total':
          {
           $total = $totals['text'];
           break;
          }
         case 'ot_shipping':
         {
           $shipping_method = $totals['title'];
            break;
          }
         default:
          {
           break;
          }
       }

       $this->totals[] = array('title' => $totals['title'], 'text' => $totals['text']);
      }

     $order_status_query = tep_db_query('SELECT orders_status_name FROM ' . TABLE_ORDERS_STATUS . ' WHERE orders_status_id = ' . (int)$order['orders_status'] . ' AND language_id = ' . (int)$languages_id);
     $order_status = tep_db_fetch_array($order_status_query);

      $this->info = array(  'currency'      => $order['currency'],
                  'currency_value'  => $order['currency_value'],
                  'payment_method'  => $order['payment_method'],
                  'cc_type'     => $order['cc_type'],
                 'cc_owner'      => $order['cc_owner'],
                  'cc_number'     => $order['cc_number'],
                 'cc_expires'    => $order['cc_expires'],
                  'date_purchased'  => $order['date_purchased'],
                  'orders_status'   => $order_status['orders_status_name'],
                 'last_modified'   => $order['last_modified'],
                 'total'       => strip_tags($total),
                  'shipping_method' => rtrim(strip_tags($shipping_method), ':') );

      $this->customer = array(  'id'        => $order['customers_id'],
                    'name'        => $order['customers_name'],
                    'company'     => $order['customers_company'],
                   'street_address'  => $order['customers_street_address'],
                    'suburb'      => $order['customers_suburb'],
                    'city'        => $order['customers_city'],
                    'postcode'      => $order['customers_postcode'],
                    'state'       => $order['customers_state'],
                   'country'     => $order['customers_country'],
                   'format_id'     => $order['customers_address_format_id'],
                   'telephone'     => $order['customers_telephone'],
                   'email_address'   => $order['customers_email_address']  );

      $this->delivery = array(  'name'        => $order['delivery_name'],
                   'company'     => $order['delivery_company'],
                    'street_address'  => $order['delivery_street_address'],
                   'suburb'      => $order['delivery_suburb'],
                   'city'        => $order['delivery_city'],
                   'postcode'      => $order['delivery_postcode'],
                   'state'       => $order['delivery_state'],
                    'country'     => $order['delivery_country'],
                    'format_id'     => $order['delivery_address_format_id'] );

      if (!strlen($this->delivery['name']) && !strlen($this->delivery['street_address']))
       $this->delivery = false;

      $this->billing = array( 'name'        => $order['billing_name'],
                  'company'     => $order['billing_company'],
                 'street_address'  => $order['billing_street_address'],
                  'suburb'      => $order['billing_suburb'],
                  'city'        => $order['billing_city'],
                  'postcode'      => $order['billing_postcode'],
                  'state'       => $order['billing_state'],
                 'country'     => $order['billing_country'],
                 'format_id'     => $order['billing_address_format_id']  );

      $orders_products_query = tep_db_query('SELECT orders_products_id, products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price FROM ' . TABLE_ORDERS_PRODUCTS . ' WHERE orders_id = ' . (int)$order_id . ' ORDER BY orders_products_id');
     while ($orders_products = tep_db_fetch_array($orders_products_query))
     {
       $this->products[$orders_products['orders_products_id']] = array(  'qty'     => $orders_products['products_quantity'],
                                         'id'      => $orders_products['products_id'],
                                         'name'      => $orders_products['products_name'],
                                         'model'     => $orders_products['products_model'],
                                          'tax'     => $orders_products['products_tax'],
                                          'price'     => $orders_products['products_price'],
                                          'final_price' => $orders_products['final_price']);

        $this->info['tax_groups'][$orders_products['products_tax']] = '1';
      }

     $attributes_query = tep_db_query('SELECT orders_products_id, products_options, products_options_values, options_values_price, price_prefix FROM ' . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . ' WHERE orders_id = ' . (int)$order_id . ' ORDER BY orders_products_attributes_id');
     while ($attributes = tep_db_fetch_array($attributes_query))
       $this->products[$attributes['orders_products_id']]['attributes'][] = array( 'option'  => $attributes['products_options'],
                                             'value'   => $attributes['products_options_values'],
                                              'prefix'  => $attributes['price_prefix'],
                                             'price'   => $attributes['options_values_price']  );

      $this->products = array_slice($this->products, 0);
    }

   function cart()
   {
     global $customer_id, $sendto, $billto, $cart, $languages_id, $currency, $currencies, $shipping, $payment;

     $this->content_type = $cart->get_content_type();

      $customer_address_query = tep_db_query('SELECT c.customers_firstname, c.customers_lastname, c.customers_telephone, c.customers_email_address, ab.entry_company, ab.entry_street_address, ab.entry_suburb, ab.entry_postcode, ab.entry_city, ab.entry_zone_id, z.zone_name, co.countries_id, co.countries_name, co.countries_iso_code_2, co.countries_iso_code_3, co.address_format_id, ab.entry_state FROM ' . TABLE_CUSTOMERS . ' c, ' . TABLE_ADDRESS_BOOK . ' ab LEFT JOIN ' . TABLE_ZONES . ' z ON (ab.entry_zone_id = z.zone_id) LEFT JOIN ' . TABLE_COUNTRIES . ' co ON (ab.entry_country_id = co.countries_id) WHERE c.customers_id = ' . (int)$customer_id . ' AND ab.customers_id = ' . (int)$customer_id . ' AND c.customers_default_address_id = ab.address_book_id');
     $customer_address = tep_db_fetch_array($customer_address_query);

      $shipping_address_query = tep_db_query('SELECT ab.entry_firstname, ab.entry_lastname, ab.entry_company, ab.entry_street_address, ab.entry_suburb, ab.entry_postcode, ab.entry_city, ab.entry_zone_id, z.zone_name, ab.entry_country_id, c.countries_id, c.countries_name, c.countries_iso_code_2, c.countries_iso_code_3, c.address_format_id, ab.entry_state FROM ' . TABLE_ADDRESS_BOOK . ' ab LEFT JOIN ' . TABLE_ZONES . ' z ON (ab.entry_zone_id = z.zone_id) LEFT JOIN ' . TABLE_COUNTRIES . ' c ON (ab.entry_country_id = c.countries_id) WHERE ab.customers_id = ' . (int)$customer_id . ' AND ab.address_book_id = ' . (int)$sendto);
      $shipping_address = tep_db_fetch_array($shipping_address_query);
     
      $billing_address_query = tep_db_query('SELECT ab.entry_firstname, ab.entry_lastname, ab.entry_company, ab.entry_street_address, ab.entry_suburb, ab.entry_postcode, ab.entry_city, ab.entry_zone_id, z.zone_name, ab.entry_country_id, c.countries_id, c.countries_name, c.countries_iso_code_2, c.countries_iso_code_3, c.address_format_id, ab.entry_state FROM ' . TABLE_ADDRESS_BOOK . ' ab LEFT JOIN ' . TABLE_ZONES . ' z ON (ab.entry_zone_id = z.zone_id) LEFT JOIN ' . TABLE_COUNTRIES . ' c ON (ab.entry_country_id = c.countries_id) WHERE ab.customers_id = ' . (int)$customer_id . ' AND ab.address_book_id = ' . (int)$billto);
     $billing_address = tep_db_fetch_array($billing_address_query);

      $this->info = array(  'order_status'    => DEFAULT_ORDERS_STATUS_ID,
                  'currency'      => $currency,
                 'currency_value'  => $currencies->currencies[$currency]['value'],
                 'payment_method'  => $payment,
                  'cc_type'     => isset($GLOBALS['cc_type']) ? $GLOBALS['cc_type'] : '',
                 'cc_owner'      => isset($GLOBALS['cc_owner']) ? $GLOBALS['cc_owner'] : '',
                 'cc_number'     => isset($GLOBALS['cc_number']) ? $GLOBALS['cc_number'] : '',
                 'cc_expires'    => isset($GLOBALS['cc_expires']) ? $GLOBALS['cc_expires'] : '',
                 'shipping_method' => $shipping['title'],
                  'shipping_cost'   => $shipping['cost'],
                 'subtotal'      => 0,
                 'tax'       => 0,
                 'tax_groups'    => array(),
                 'comments'      => isset($GLOBALS['comments']) ? $GLOBALS['comments'] : ''  );

      if (isset($GLOBALS[$payment]) && is_object($GLOBALS[$payment]))
     {
       $this->info['payment_method'] = $GLOBALS[$payment]->title;
        if (isset($GLOBALS[$payment]->order_status) && is_numeric($GLOBALS[$payment]->order_status) && $GLOBALS[$payment]->order_status > 0)
          $this->info['order_status'] = $GLOBALS[$payment]->order_status;
     }

     $this->customer = array(  'firstname'     => $customer_address['customers_firstname'],
                    'lastname'      => $customer_address['customers_lastname'],
                   'company'     => $customer_address['entry_company'],
                    'street_address'  => $customer_address['entry_street_address'],
                   'suburb'      => $customer_address['entry_suburb'],
                   'city'        => $customer_address['entry_city'],
                   'postcode'      => $customer_address['entry_postcode'],
                   'state'       => tep_not_null($customer_address['entry_state']) ? $customer_address['entry_state'] : $customer_address['zone_name'],
                    'zone_id'     => $customer_address['entry_zone_id'],
                    'country'     => array( 'id'      => $customer_address['countries_id'],
                                   'title'     => $customer_address['countries_name'],
                                   'iso_code_2'  => $customer_address['countries_iso_code_2'],
                                   'iso_code_3'  => $customer_address['countries_iso_code_3']  ),
                    'format_id'     => $customer_address['address_format_id'],
                    'telephone'     => $customer_address['customers_telephone'],
                    'email_address'   => $customer_address['customers_email_address'] );

      $this->delivery = array(  'firstname'     => $shipping_address['entry_firstname'],
                    'lastname'      => $shipping_address['entry_lastname'],
                   'company'     => $shipping_address['entry_company'],
                    'street_address'  => $shipping_address['entry_street_address'],
                   'suburb'      => $shipping_address['entry_suburb'],
                   'city'        => $shipping_address['entry_city'],
                   'postcode'      => $shipping_address['entry_postcode'],
                   'state'       => tep_not_null($shipping_address['entry_state']) ? $shipping_address['entry_state'] : $shipping_address['zone_name'],
                    'zone_id'     => $shipping_address['entry_zone_id'],
                    'country'     => array( 'id'      => $shipping_address['countries_id'],
                                   'title'     => $shipping_address['countries_name'],
                                   'iso_code_2'  => $shipping_address['countries_iso_code_2'],
                                   'iso_code_3'  => $shipping_address['countries_iso_code_3']  ),
                    'country_id'    => $shipping_address['entry_country_id'],
                   'format_id'     => $shipping_address['address_format_id'] );

      $this->billing = array( 'firstname'     => $billing_address['entry_firstname'],
                 'lastname'      => $billing_address['entry_lastname'],
                  'company'     => $billing_address['entry_company'],
                 'street_address'  => $billing_address['entry_street_address'],
                  'suburb'      => $billing_address['entry_suburb'],
                  'city'        => $billing_address['entry_city'],
                  'postcode'      => $billing_address['entry_postcode'],
                  'state'       => tep_not_null($billing_address['entry_state']) ? $billing_address['entry_state'] : $billing_address['zone_name'],
                 'zone_id'     => $billing_address['entry_zone_id'],
                 'country'     => array( 'id'      => $billing_address['countries_id'],
                                  'title'     => $billing_address['countries_name'],
                                  'iso_code_2'  => $billing_address['countries_iso_code_2'],
                                  'iso_code_3'  => $billing_address['countries_iso_code_3'] ),
                  'country_id'    => $billing_address['entry_country_id'],
                  'format_id'     => $billing_address['address_format_id']  );

      if ($this->content_type == 'virtual')
     {
       $tax_country_id = $billing_address['entry_country_id'];
       $tax_zone_id = $billing_address['entry_zone_id'];
     }
     else
      {
       $tax_country_id = $shipping_address['entry_country_id'];
        $tax_zone_id = $shipping_address['entry_zone_id'];
      }

     foreach ($cart->get_products() as $product)
     {
       $data = array(  'qty'       => $product['quantity'],
                'name'        => $product['name'],
                'model'       => $product['model'],
               'tax'       => tep_get_tax_rate($product['tax_class_id'], $tax_country_id, $tax_zone_id),
               'tax_description' => tep_get_tax_description($product['tax_class_id'], $tax_country_id, $tax_zone_id),
                'price'       => $product['price'],
               'final_price'   => $product['final_price'],
               'weight'      => $product['weight'],
                'id'        => $product['id'] );

        if (is_array($product['attributes']))
       {
         $sql = '';
          foreach ($product['attributes'] as $option => $value)
           $sql .= 'ROW(' . (int)$option . ', ' . (int)$value . '), ';

         if (strlen($sql))
         {
           $rowset = tep_db_query( 'SELECT popt.products_options_id, popt.products_options_name, poval.products_options_values_id, poval.products_options_values_name, pa.options_values_price, pa.price_prefix' .
                       ' FROM ' . TABLE_PRODUCTS_ATTRIBUTES . ' AS pa' .
                       ' INNER JOIN ' . TABLE_PRODUCTS_OPTIONS . ' AS popt ON (pa.options_id = popt.products_options_id AND popt.language_id = ' . (int)$languages_id . ')' .
                        ' INNER JOIN ' . TABLE_PRODUCTS_OPTIONS_VALUES . ' AS poval ON (pa.options_values_id = poval.products_options_values_id AND poval.language_id = ' . (int)$languages_id . ')' .
                        ' WHERE pa.products_id = ' . (int)$product['id'] . ' AND ROW(pa.options_id, pa.options_values_id) IN (' . substr($sql, 0, -2) . ') ORDER BY pa.products_options_sort_order' );

            while ($row = tep_db_fetch_array($rowset))
              $data['attributes'][] = array(  'option'  => $row['products_options_name'],
                             'value'   => $row['products_options_values_name'],
                              'option_id' => $row['products_options_id'],
                             'value_id'  => $row['products_options_values_id'],
                              'prefix'  => $row['price_prefix'],
                              'price'   => $row['options_values_price'] );
          }
       }

       $shown_price = tep_add_tax($data['final_price'], $data['tax']) * $data['qty'];
        $this->info['subtotal'] += $shown_price;

        $tax = $shown_price * $data['tax'] * 0.01;
        if (DISPLAY_PRICE_WITH_TAX == 'true')
         $tax /= (1 + $data['tax'] * 0.01);

        $this->info['tax'] += $tax;

       if (!isset($this->info['tax_groups'][$data['tax_description']]))
          $this->info['tax_groups'][$data['tax_description']] = 0;

        $this->info['tax_groups'][$data['tax_description']] += $tax;

        $this->products[] = $data;
      }

     $this->info['total'] = $this->info['subtotal'] + $this->info['shipping_cost'];
      if (DISPLAY_PRICE_WITH_TAX != 'true')
       $this->info['total'] += $this->info['tax'];
   }
 }

?>

idem, comportement identique, code optimisé et plus lisible + lecture produits et attributs dans le même ordre que la fiche produit / insertion au panier (avant c'était selon le bon vouloir de la bdd)
steph68
Membre actif
 
Messages: 17
Inscription: Sam 01 Aoû 2009, 12:25

Messagepar steph68 » Jeu 10 Juin 2010, 15:47

la classe order.php (à décliner en held_order.php en changeant juste le nom des tables de la BDD) pour la partie ADMIN:

Code: Tout sélectionner
<?php

  class order
 {
   var $info, $totals, $products, $customer, $delivery;

    function order($order_id)
   {
     $this->info = array();
      $this->totals = array();
      $this->products = array();
      $this->customer = array();
      $this->delivery = array();
      $this->query($order_id);
    }

   function query($order_id)
   {
     $order_query = tep_db_query(  'SELECT customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id,' .
                      ' delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id,' .
                     ' billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id,' .
                      ' payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified, ip_address' .
                     ' FROM ' . TABLE_ORDERS . ' WHERE orders_id = ' . (int)$order_id  );

      $order = tep_db_fetch_array($order_query);

      $totals_query = tep_db_query('SELECT title, text FROM ' . TABLE_ORDERS_TOTAL . ' WHERE orders_id = ' . (int)$order_id . ' ORDER BY sort_order');
      while ($totals = tep_db_fetch_array($totals_query))
       $this->totals[] = array('title' => $totals['title'], 'text' => $totals['text']);

      $this->info = array(  'currency'      => $order['currency'],
                  'currency_value'  => $order['currency_value'],
                  'payment_method'  => $order['payment_method'],
                  'cc_type'     => $order['cc_type'],
                 'cc_owner'      => $order['cc_owner'],
                  'cc_number'     => $order['cc_number'],
                 'cc_expires'    => $order['cc_expires'],
                  'date_purchased'  => $order['date_purchased'],
                  'orders_status'   => $order['orders_status'],
                 'last_modified'   => $order['last_modified']  );

      $this->customer = array(  'name'        => $order['customers_name'],
                    'company'     => $order['customers_company'],
                   'street_address'  => $order['customers_street_address'],
                    'suburb'      => $order['customers_suburb'],
                    'city'        => $order['customers_city'],
                    'postcode'      => $order['customers_postcode'],
                    'state'       => $order['customers_state'],
                   'country'     => $order['customers_country'],
                   'format_id'     => $order['customers_address_format_id'],
                   'telephone'     => $order['customers_telephone'],
                   'email_address'   => $order['customers_email_address'],
                   'ip_address'    => $order['ip_address'] );

      $this->delivery = array(  'name'        => $order['delivery_name'],
                   'company'     => $order['delivery_company'],
                    'street_address'  => $order['delivery_street_address'],
                   'suburb'      => $order['delivery_suburb'],
                   'city'        => $order['delivery_city'],
                   'postcode'      => $order['delivery_postcode'],
                   'state'       => $order['delivery_state'],
                    'country'     => $order['delivery_country'],
                    'format_id'     => $order['delivery_address_format_id'] );

      $this->billing = array( 'name'        => $order['billing_name'],
                  'company'     => $order['billing_company'],
                 'street_address'  => $order['billing_street_address'],
                  'suburb'      => $order['billing_suburb'],
                  'city'        => $order['billing_city'],
                  'postcode'      => $order['billing_postcode'],
                  'state'       => $order['billing_state'],
                 'country'     => $order['billing_country'],
                 'format_id'     => $order['billing_address_format_id']  );

      $orders_products_query = tep_db_query('SELECT orders_products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price FROM ' . TABLE_ORDERS_PRODUCTS . ' WHERE orders_id = ' . (int)$order_id . ' ORDER BY orders_products_id');
      while ($orders_products = tep_db_fetch_array($orders_products_query))
     {
       $this->products[$orders_products['orders_products_id']] = array(  'qty'     => $orders_products['products_quantity'],
                                         'name'      => $orders_products['products_name'],
                                         'model'     => $orders_products['products_model'],
                                          'tax'     => $orders_products['products_tax'],
                                          'price'     => $orders_products['products_price'],
                                          'final_price' => $orders_products['final_price']);
      }

     $attributes_query = tep_db_query('SELECT orders_products_id, products_options, products_options_values, options_values_price, price_prefix FROM ' . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . ' WHERE orders_id = ' . (int)$order_id . ' ORDER BY orders_products_attributes_id');
     while ($attributes = tep_db_fetch_array($attributes_query))
       $this->products[$attributes['orders_products_id']]['attributes'][] = array( 'option'  => $attributes['products_options'],
                                             'value'   => $attributes['products_options_values'],
                                              'prefix'  => $attributes['price_prefix'],
                                             'price'   => $attributes['options_values_price']  );

      $this->products = array_slice($this->products, 0);
    }
 }

?>
steph68
Membre actif
 
Messages: 17
Inscription: Sam 01 Aoû 2009, 12:25

Messagepar steph68 » Jeu 10 Juin 2010, 15:50

et enfin le fichier checkout_process (qu'on retrouve dans held_order_process, et éventuellement paypal IPN)
Seulement là, pour pas m'embêter, j'ai supprimé la vérif de stock + attributs de download de fichier ...
donc à n'utiliser que pour s'inspirer ...

la grosse amélioration est :
* dans la classe 'order.php' on charge déjà les détails des attributs (nom, valeur, prix, prefixe), pourquoi le refaire dans checkout_process ???!

Code: Tout sélectionner
<?php

 include('includes/application_top.php');
  $ip = $HTTP_SERVER_VARS["REMOTE_ADDR"];

 // if the customer is not logged on, redirect them to the login page
  if (!tep_session_is_registered('customer_id'))
  {
   $navigation->set_snapshot(array('mode' => 'SSL', 'page' => FILENAME_CHECKOUT_PAYMENT));
   tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
 }

 if (!tep_session_is_registered('sendto'))
   tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));

  if (tep_not_null(MODULE_PAYMENT_INSTALLED) && !tep_session_is_registered('payment'))
    tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));

  // avoid hack attempts during the checkout procedure by checking the internal cartID
  if (isset($cart->cartID) && tep_session_is_registered('cartID') && $cart->cartID != $cartID)
    tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));

 include(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_PROCESS);

  // load selected payment module
 require(DIR_WS_CLASSES . 'payment.php');
  $payment_modules = new payment($payment);

 // load the selected shipping module
  require(DIR_WS_CLASSES . 'shipping.php');
 $shipping_modules = new shipping($shipping);

  require(DIR_WS_CLASSES . 'order.php');
  $order = new order;

 // load the before_process function from the payment modules
  $payment_modules->before_process();

 require(DIR_WS_CLASSES . 'order_total.php');
  $order_total_modules = new order_total;

 $order_totals = $order_total_modules->process();

  tep_db_perform(TABLE_ORDERS, array( 'customers_id'          => $customer_id,
                    'customers_name'        => $order->customer['firstname'] . ' ' . $order->customer['lastname'],
                    'customers_company'       => $order->customer['company'],
                   'customers_street_address'    => $order->customer['street_address'],
                    'customers_suburb'        => $order->customer['suburb'],
                    'customers_city'        => $order->customer['city'],
                    'customers_postcode'      => $order->customer['postcode'],
                   'customers_state'       => $order->customer['state'],
                    'customers_country'       => $order->customer['country']['title'],
                   'customers_telephone'     => $order->customer['telephone'],
                    'customers_email_address'   => $order->customer['email_address'],
                   'customers_address_format_id' => $order->customer['format_id'],
                    'delivery_name'         => $order->delivery['firstname'] . ' ' . $order->delivery['lastname'],
                   'delivery_company'        => $order->delivery['company'],
                   'delivery_street_address'   => $order->delivery['street_address'],
                   'delivery_suburb'       => $order->delivery['suburb'],
                   'delivery_city'         => $order->delivery['city'],
                   'delivery_postcode'       => $order->delivery['postcode'],
                   'delivery_state'        => $order->delivery['state'],
                    'delivery_country'        => $order->delivery['country']['title'],
                   'delivery_address_format_id'  => $order->delivery['format_id'],
                    'billing_name'          => $order->billing['firstname'] . ' ' . $order->billing['lastname'],
                   'billing_company'       => $order->billing['company'],
                    'billing_street_address'    => $order->billing['street_address'],
                    'billing_suburb'        => $order->billing['suburb'],
                    'billing_city'          => $order->billing['city'],
                    'billing_postcode'        => $order->billing['postcode'],
                    'billing_state'         => $order->billing['state'],
                   'billing_country'       => $order->billing['country']['title'],
                    'billing_address_format_id'   => $order->billing['format_id'],
                   'payment_method'        => $order->info['payment_method'],
                   'cc_type'           => $order->info['cc_type'],
                    'cc_owner'            => $order->info['cc_owner'],
                   'cc_number'           => $order->info['cc_number'],
                    'cc_expires'          => $order->info['cc_expires'],
                   'date_purchased'        => 'now()',
                    'orders_status'         => $order->info['order_status'],
                   'currency'            => $order->info['currency'],
                   'currency_value'        => $order->info['currency_value'],
                    'ip_address'          => $ip  ));

 $insert_id = tep_db_insert_id();

  foreach ($order_totals as $total)
   tep_db_perform(TABLE_ORDERS_TOTAL, array( 'orders_id'   => $insert_id,
                          'title'     => $total['title'],
                         'text'      => $total['text'],
                          'value'     => $total['value'],
                         'class'     => $total['code'],
                          'sort_order'  => $total['sort_order'] ));

 tep_db_perform(TABLE_ORDERS_STATUS_HISTORY, array(  'orders_id'     => $insert_id,
                            'orders_status_id'  => $order->info['order_status'],
                            'date_added'    => 'now()',
                           'customer_notified' => (int)(SEND_EMAILS == 'true'),
                            'comments'      => $order->info['comments'] ));

 $email_order =  STORE_NAME . "n" .
          EMAIL_SEPARATOR . "n" .
         EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "n" .
          EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "n" .
         EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "nn";

  if ($order->info['comments'])
   $email_order .= tep_db_output($order->info['comments']) . "nn";

 $email_order .= EMAIL_TEXT_PRODUCTS . "n" .
         EMAIL_SEPARATOR . "n";

  foreach ($order->products as $product)
  {
   $email_order .= $product['qty'] . ' x ' . $product['name'] . ' (' . $product['model'] . ') = ' . $currencies->display_price($product['final_price'], $product['tax'], $product['qty']);

   // Update products_ordered (for bestsellers list)
   tep_db_query('UPDATE ' . TABLE_PRODUCTS . ' SET products_ordered = products_ordered + ' . (int)$product['qty'] . ' WHERE products_id = ' . tep_get_prid($product['id']));

   tep_db_perform(TABLE_ORDERS_PRODUCTS, array(  'orders_id'     => $insert_id,
                           'products_id'   => tep_get_prid($product['id']),
                           'products_model'  => $product['model'],
                            'products_name'   => $product['name'],
                           'products_price'  => $product['price'],
                            'final_price'   => $product['final_price'],
                            'products_tax'    => $product['tax'],
                            'products_quantity' => $product['qty']  ));

   $order_products_id = tep_db_insert_id();

    if (isset($product['attributes']))
    {
     foreach ($product['attributes'] as $attribute)
      {
       $email_order .= "nt" . $attribute['option'] . ' ' . $attribute['value'];

        tep_db_perform(TABLE_ORDERS_PRODUCTS_ATTRIBUTES, array( 'orders_id'         => $insert_id,
                                    'orders_products_id'    => $order_products_id,
                                   'products_options'      => $attribute['option'],
                                    'products_options_values' => $attribute['value'],
                                    'options_values_price'    => $attribute['price'],
                                    'price_prefix'        => $attribute['prefix'] ));
     }
   }

   $email_order .= "n";
  }

 $email_order .= EMAIL_SEPARATOR . "n";

  foreach ($order_totals as $total)
   $email_order .= strip_tags($total['title']) . ' ' . strip_tags($total['text']) . "n";

 if ($order->content_type != 'virtual')
    $email_order .= "n" . EMAIL_TEXT_DELIVERY_ADDRESS . "n" . EMAIL_SEPARATOR . "n" .
           tep_address_label($customer_id, $sendto, 0, '', "n") . "n";

 $email_order .= "n" . EMAIL_TEXT_BILLING_ADDRESS . "n" . EMAIL_SEPARATOR . "n" .
          tep_address_label($customer_id, $billto, 0, '', "n") . "nn";

  if (is_object($$payment))
 {
   $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "n" . EMAIL_SEPARATOR . "n";

    $payment_class = $$payment;
   $email_order .= $payment_class->title . "nn";

   if ($payment_class->email_footer)
     $email_order .= $payment_class->email_footer . "nn";
  }

 tep_mail($order->customer['lastname'] . ' ' . $order->customer['firstname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

  // send emails to other people
  if (SEND_EXTRA_ORDER_EMAILS_TO != '')
   tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 // load the after_process function from the payment modules
 $payment_modules->after_process();

  $cart->reset(true);

 // unregister session variables used during checkout
  tep_session_unregister('sendto');
 tep_session_unregister('billto');
 tep_session_unregister('shipping');
 tep_session_unregister('payment');
  tep_session_unregister('comments');

 // held_orders
  if (tep_session_is_registered('held_order'))
  {
   tep_db_query('DELETE FROM ' . TABLE_HOLDING_ORDERS . ' WHERE orders_id = ' . $held_order);
    tep_db_query('DELETE FROM ' . TABLE_HOLDING_ORDERS_PRODUCTS . ' WHERE orders_id = ' . $held_order);
   tep_db_query('DELETE FROM ' . TABLE_HOLDING_ORDERS_PRODUCTS_ATTRIBUTES . ' WHERE orders_id = ' . $held_order);
    tep_db_query('DELETE FROM ' . TABLE_HOLDING_ORDERS_STATUS_HISTORY . ' WHERE orders_id = ' . $held_order);
   tep_db_query('DELETE FROM ' . TABLE_HOLDING_ORDERS_TOTAL . ' WHERE orders_id = ' . $held_order);
    tep_session_unregister('held_order');
 }

 tep_redirect(tep_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL'));

  require(DIR_WS_INCLUDES . 'application_bottom.php');

?>
steph68
Membre actif
 
Messages: 17
Inscription: Sam 01 Aoû 2009, 12:25

Messagepar steph68 » Jeu 10 Juin 2010, 15:54

j'ai aussi fais un module d'expédition mondial relay (avec choix du relais), la possibilité d'avoir des champs textes pour une personnalisation du produit par les clients ...

un peu trop long pour l'expliquer ici, mais s'il y a des gens intéressés, laissez un message.

@+
steph68
Membre actif
 
Messages: 17
Inscription: Sam 01 Aoû 2009, 12:25

Messagepar oscim » Jeu 10 Juin 2010, 15:54

Merci

Je vais essayer de remonter ca sur svn.

Tel quel ? aucune modif ?
Pour un web au normes du W3C, pour un web plus propre !

- Download osCSS Toutes versions
- stable osCSS 2.1.0 (help|info|new dev) Official help|wiki|Tuto for osCSS 2 | doc doxygen
- Utiliser le tracker pour suivre les évolutions et développements
- Inscrivez vos sites sur oscss pour présenter vos réalisations
Avatar de l’utilisateur
oscim
Site Admin
 
Messages: 1643
Inscription: Mar 25 Sep 2007, 11:33

Messagepar steph68 » Jeu 10 Juin 2010, 16:02

pour le shopping_cart et order (catalog et admin), tu peux y aller tel quel. testé sous PHP 4.4.9, MySQL 5.1.36 (ça devrait rien changer si <)

vérifie quand meme, je connais pas la v1.2.2 de oscss
mais c'est actuellement en production sur 3 sites de la v1.2.1
steph68
Membre actif
 
Messages: 17
Inscription: Sam 01 Aoû 2009, 12:25

Messagepar oscim » Jeu 10 Juin 2010, 16:29

OKi,

Je vais faire ca entre 2, mais etant trop occupé par la v2, je n'aurais pas bcp de temps de tester :)

Je mettrais une 1.2.2 RC b
Pour un web au normes du W3C, pour un web plus propre !

- Download osCSS Toutes versions
- stable osCSS 2.1.0 (help|info|new dev) Official help|wiki|Tuto for osCSS 2 | doc doxygen
- Utiliser le tracker pour suivre les évolutions et développements
- Inscrivez vos sites sur oscss pour présenter vos réalisations
Avatar de l’utilisateur
oscim
Site Admin
 
Messages: 1643
Inscription: Mar 25 Sep 2007, 11:33


Retourner vers Developpement

Qui est en ligne

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

cron