Realizzare un pacchetto interessante

Questo forum è dedicato alle discussioni riguardanti le contribution per osCommerce

Moderatore: mod Generali

Bass
membro Master
membro Master
Messaggi: 3593
Iscritto il: 18/04/2004, 0:00
Località: Varese
Contatta:

Messaggio da Bass »

wiko85 ha scritto:beh, potreste elencarmene alcuni?
magari provo ad installarli e vedere come funzionano... grazie!
Prova a guardare questi

http://www.oscommerce.com/community/con ... 578/page,2
http://www.oscommerce.com/community/con ... 927/page,2


Giusto per prendere spunto :wink:

'iao

Sergio
http://www.oscomtemplate.com - E' disponibile il nuovo pacchetto free con forum di supporto

http://www.semilandia.it
Avatar utente
wiko85
membro Veteran
membro Veteran
Messaggi: 731
Iscritto il: 15/09/2005, 11:24
Contatta:

Messaggio da wiko85 »

wiko85 ha scritto:
Si, se scarichi la contribution e effettui le modifiche al contrario.
si, ho fatto così infatti ed è andato tutto bene...
ops, forse ho parlato prima del tempo...

in application_top.php se elimino il codice del wish_list mi da errore il sito...

il codice è questo...

Codice: Seleziona tutto

// Wish List 2.3 Start
// *****************************************
      // Remove item from the Wish List
      case 'remove_wishlist':
                              tep_db_query("delete from " . TABLE_WISHLIST . " where products_id = '" . $HTTP_GET_VARS['pid'] . "' and customers_id = '" . $customer_id . "'");
                              tep_db_query("delete from " . TABLE_WISHLIST_ATTRIBUTES . " WHERE customers_id=$customer_id AND products_id= '" . $HTTP_GET_VARS['pid'] . "'");
                              tep_redirect(tep_href_link(FILENAME_WISHLIST));
                              break;
    } // end switch $HTTP_GET_VARS['action']
  } // end if is set $HTTP_GET_VARS['action']

  // Shopping cart actions through POST variables from forms
  if (isset($HTTP_POST_VARS['wishlist_action'])) {
    // redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled
    if ($session_started == false) {
      tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE));
    }

    $goto = basename($PHP_SELF);
    switch ($HTTP_POST_VARS['wishlist_action']) {
      // Customer wants to update the product quantity in their shopping cart
      case 'add_wishlist' :  if (ereg('^[0-9]+$', $HTTP_POST_VARS['products_id'])) {
                                if ($HTTP_POST_VARS['products_id']) {
                                  if ($customer_id > 0) {
								    // Queries below replace old product instead of adding to queatity.
                                    tep_db_query("delete from " . TABLE_WISHLIST . " where products_id = '" . $HTTP_POST_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'");
                                    tep_db_query("insert into " . TABLE_WISHLIST . " (customers_id, products_id, products_model, products_name, products_price) values ('" . $customer_id . "', '" . $products_id . "', '" . $products_model . "', '" . $products_name . "', '" . $products_price . "' )");
                                    tep_db_query("delete from " . TABLE_WISHLIST_ATTRIBUTES . " where products_id = '" . $HTTP_POST_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'");
                                    // Read array of options and values for attributes in id[]
                                    if (isset ($id)) {
                                      foreach($id as $att_option=>$att_value) {
                                        // Add to customers_wishlist_attributes table
                                        tep_db_query("insert into " . TABLE_WISHLIST_ATTRIBUTES . " (customers_id, products_id, products_options_id , products_options_value_id) values ('" . $customer_id . "', '" . $products_id . "', '" . $att_option . "', '" . $att_value . "' )");
                                      }
                                    }
                                  }
                                }
                              }
                              break;

      case 'wishlist_add_cart' :if (ereg('^[0-9]+$', $HTTP_POST_VARS['products_id'])) {
                                  if ($HTTP_POST_VARS['products_id']) {
                                  if ($customer_id > 0) {
                                    tep_db_query("delete from " . TABLE_WISHLIST . " where products_id = '" . $HTTP_POST_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'");
                                    tep_db_query("delete from " . TABLE_WISHLIST_ATTRIBUTES . " where products_id = '" . $HTTP_POST_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'");
                                    // Read array of options and values for attributes in id[]
                                    if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {
                                       $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);
                                    }
                                    tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                                    break;
                                  }
                                }
                              }
                              break;

       // Wishlist Checkboxes
       case 'add_delete_products_wishlist': 
                                      if (isset($HTTP_POST_VARS['add_wishprod'])) {
                                         if ($HTTP_POST_VARS['borrar'] == 0) { 
										       // 'borrar' form variable refers to deleting products in array $add_wishprod[] from wishlist
                                               foreach ($HTTP_POST_VARS['add_wishprod'] as $value) {
                                                    if (ereg('^[0-9]+$', $value)) {
                                                    $cart->add_cart($value, $cart->get_quantity(tep_get_uprid($value, $HTTP_POST_VARS['id'][$value]))+1, $HTTP_POST_VARS['id'][$value]);
                                                    tep_db_query("delete from " . TABLE_WISHLIST . " where products_id = $value and customers_id = '" . $customer_id . "'");
                                                    tep_db_query("delete from " . TABLE_WISHLIST_ATTRIBUTES . " where products_id = '$value' and customers_id = '" . $customer_id . "'");
                                                    }
                                               }
                                             tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                                         }
                                         if ($HTTP_POST_VARS['borrar'] == 1) {
                                               foreach ($HTTP_POST_VARS['add_wishprod'] as $value) {
                                                    if (ereg('^[0-9]+$', $value)) {    
                                                     tep_db_query("delete from " . TABLE_WISHLIST . " where products_id = $value and customers_id = '" . $customer_id . "'");
                                                    tep_db_query("delete from " . TABLE_WISHLIST_ATTRIBUTES . " where products_id = '$value' and customers_id = '" . $customer_id . "'");
                                                   }
                                              }
                                             tep_redirect(tep_href_link(FILENAME_WISHLIST));
                                         }
                                      }
                                      break;

    } // end switch ($HTTP_POST_VARS['wishlist_action'])
  } // end isset($HTTP_POST_VARS)
// *****************************************
// Wish List 2.3 End
Bass
membro Master
membro Master
Messaggi: 3593
Iscritto il: 18/04/2004, 0:00
Località: Varese
Contatta:

Messaggio da Bass »

wiko85 ha scritto: ops, forse ho parlato prima del tempo...
in application_top.php se elimino il codice del wish_list mi da errore il sito...
A dir la verita' non ricordo bene le modifiche della wishlist, mi pare che quella parte non sovrascrivesse niente, ma non ne sono sicuro...
O forse, se non hai tolto tutto il codice dal resto del sito generea comunque errore

'iao

Sergio
http://www.oscomtemplate.com - E' disponibile il nuovo pacchetto free con forum di supporto

http://www.semilandia.it
Avatar utente
wiko85
membro Veteran
membro Veteran
Messaggi: 731
Iscritto il: 15/09/2005, 11:24
Contatta:

Messaggio da wiko85 »

guarda, l'errore che genera è questo:


Parse error: parse error in catalog\includes\application_top.php on line 522

da cosa potrebbe dipendere?

grazie bass...
Bass
membro Master
membro Master
Messaggi: 3593
Iscritto il: 18/04/2004, 0:00
Località: Varese
Contatta:

Messaggio da Bass »

wiko85 ha scritto:guarda, l'errore che genera è questo:
Parse error: parse error in catalog\includes\application_top.php on line 522
da cosa potrebbe dipendere?
Strano che non ti dia anche l'errore. COmunque potrebbero essere molte cose, principalmente delle parentesi non chiuse. Se hai sottomano un application_top del pacchetto pulito di oscommerce prova a vedere com'e' il codice in quel punto

'iao

Sergio
http://www.oscomtemplate.com - E' disponibile il nuovo pacchetto free con forum di supporto

http://www.semilandia.it
Avatar utente
wiko85
membro Veteran
membro Veteran
Messaggi: 731
Iscritto il: 15/09/2005, 11:24
Contatta:

Messaggio da wiko85 »

ho visto per bene ma non ho trovato nessun errore...

sembra essere tutto apposto... :?
Rispondi