Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Attribute


Yepi1533005574

Recommended Posts

Hallo, gibt es eine Möglichkeit nur die Attribute an den Warenkorb zu bergeben die tatsächlich ausgewählt worden sind ?

Ich meine, wenn ich 30 verschiedene Optionen zu Auswahl habe aber nur 3 vom Kunden dazu bestellt werden ist die Liste ziemlich lang und beim Rechnungsdruck ist es dann auch unübersichtlich wenn alle 30 gelistet sind obwohl nur 3 gewählt wurden. Danke schon mal für weitere Hilfe

Link to comment
Share on other sites

@Yepi1533005574

Alles ist möglich. Meine Version hat die Artikelmerkmale alle als Pflichtfeld gesetzt, somit sind auch da genauere und bessere Daten vom Kunden verfügbar.

We stay in touch...! :-)

  • The clever one learn from everything and from everybody
  • The normal one learn from his experience
  • The silly one knows everything better

[socrates, 412 before Christ]

Computers help us with the problems we wouldn't have without them!
99.9% of the bugs sit in front of the computer!
My programmed add-ons: WDW EasyTabs 1.0.3, WDW Facebook Like 1.0.0

if(isset($this) || !isset($this)){ // that's the question...

 

Link to comment
Share on other sites

ja, habe ich gesehen. doch dies ist ja nicht meine Absicht da es bei mir leider nicht machbar ist.

Ich benötige eine freie Wahl wo der Kunde aus allen verfügbaren Attributen auswählen kann was er dazu haben möchte und nur eben diese auch im Endeffekt übergeben werden.

Hierbei wird die "products_options_values_name" eine grosse Rolle spielen.
ist das Feld leer soll eben dieser Atributt nicht im Warenkorb  und auch nicht auf der Rechnung erscheinen.

Edited by Yepi
Link to comment
Share on other sites

vor 20 Stunden, Yepi1533005574 said:

ja, habe ich gesehen. doch dies ist ja nicht meine Absicht da es bei mir leider nicht machbar ist.

Ich benötige eine freie Wahl wo der Kunde aus allen verfügbaren Attributen auswählen kann was er dazu haben möchte und nur eben diese auch im Endeffekt übergeben werden.

Hierbei wird die "products_options_values_name" eine grosse Rolle spielen.
ist das Feld leer soll eben dieser Atributt nicht im Warenkorb  und auch nicht auf der Rechnung erscheinen.

ist kein Problem. Hast ja meine PM.

  • The clever one learn from everything and from everybody
  • The normal one learn from his experience
  • The silly one knows everything better

[socrates, 412 before Christ]

Computers help us with the problems we wouldn't have without them!
99.9% of the bugs sit in front of the computer!
My programmed add-ons: WDW EasyTabs 1.0.3, WDW Facebook Like 1.0.0

if(isset($this) || !isset($this)){ // that's the question...

 

Link to comment
Share on other sites

  • 4 months later...

Ich bräuchte unbedingt etwas Hilfe.

Hier soll ein Button erscheinen der zum Popup für Produktattribute führt.
Dieser soll aber nur angezeigt werden wenn die zwei Voraussätzungen erfüllt sind. 
Hier hänge ich aber bei den Attributen. Nur wenn ein Produkt auch Attribute aufweist soll der Button erscheinen.

 

<?php if (DISPLAY_CART == 'false') {
$attributes_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$products_id . "'");
$attributes = tep_db_fetch_array($attributes_query);                        
                        if ($attributes['count'] > 0){
                              echo tep_draw_button(IMAGE_BUTTON_PROD_ATTRIBUTES, 'lightbulb', tep_href_link(FILENAME_ATTRIBUTE_POPUP, 'products_id=' . $all_products['products_id']) . '' );
                              }else{
                              }
                              }
                              ?>

Link to comment
Share on other sites

in der includes/function/general.php gibt es eine funktion:
 

// Check if product has attributes
  function tep_has_product_attributes($products_id) {
    $attributes_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$products_id . "'");
    $attributes = tep_db_fetch_array($attributes_query);

    if ($attributes['count'] > 0) {
      return true;
    } else {
      return false;
    }
  }

diese sollte helfen.

  • The clever one learn from everything and from everybody
  • The normal one learn from his experience
  • The silly one knows everything better

[socrates, 412 before Christ]

Computers help us with the problems we wouldn't have without them!
99.9% of the bugs sit in front of the computer!
My programmed add-ons: WDW EasyTabs 1.0.3, WDW Facebook Like 1.0.0

if(isset($this) || !isset($this)){ // that's the question...

 

Link to comment
Share on other sites

Hi, Ja das hatte ich schon oben gepostet doch diese Variante bringt mir leider keine Resultate.
Der Button zum Popup soll nur dann erscheinen wenn  die Funktion der Weiterleitung zum Warenkorb deaktiviert ist und eben das besagte Produkt Attribute aufweist. 

 

<?php if (DISPLAY_CART == 'false') {
$attributes_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$products_id . "'");
$attributes = tep_db_fetch_array($attributes_query);                        
                        if ($attributes['count'] > 0){
                              echo tep_draw_button(IMAGE_BUTTON_PROD_ATTRIBUTES, 'lightbulb', tep_href_link(FILENAME_ATTRIBUTE_POPUP, 'products_id=' . $all_products['products_id']) . '' );
                              }else{
                              }
                              }
                              ?>

Link to comment
Share on other sites

Dazu sollte ich noch schreiben dass diese Funktion in der general.php bei mir deaktiviert wurde um Produkte direkt in den Warenkorb zu legen.
Diese sieht so aus:

// Check if product has attributes
  function tep_has_product_attributes($products_id) {
    $attributes_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$products_id . "'");
    $attributes = tep_db_fetch_array($attributes_query);

    if ($attributes['count'] > 0) {
      return false;
    } else {
      return false;
    }
  }
Link to comment
Share on other sites

Was ist denn da das Problem? Nehme die Funktion, kopiere diese und benenne Sie um. Dann eine if Abfrage über die neue Funktion zum Anzeigen des Buttons.

Wenn Du natürlich Core Funktionen deaktiviert bzw. umänderst versaust Du den gesamten Code und weitere Probleme sind vorprogrammiert. Wenn Attribute vorhanden sind, und es müssen diese ausgefüllt werden, gibt es in den osC add-on eine Contrib. Habe leider vergessen wie diese heißt. Wirst sie aber bestimmt finden.

Noch eine Idee: Setze bei den Attributen "keine Auswahl" notiere die ID des Attributes und lass eine Schleife in der shoppingcart.php darüber laufen, in einer IF Abfrage auf die ID abfragen und nur Attribute ausgeben, die nicht die ID der "keine Auswahl" haben. So kannst Du es auch bei Deiner Rechnung machen.

Edited by mcmannehan
  • The clever one learn from everything and from everybody
  • The normal one learn from his experience
  • The silly one knows everything better

[socrates, 412 before Christ]

Computers help us with the problems we wouldn't have without them!
99.9% of the bugs sit in front of the computer!
My programmed add-ons: WDW EasyTabs 1.0.3, WDW Facebook Like 1.0.0

if(isset($this) || !isset($this)){ // that's the question...

 

Link to comment
Share on other sites

Also egal wie die Abfrage gestartet wird der Button wird nicht angezeigt.

if (DISPLAY_CART == 'false') {
$products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");
$products_attributes = tep_db_fetch_array($products_attributes_query);
if ($products_attributes['total'] > 0) {                                 
                                 echo tep_draw_button(IMAGE_BUTTON_PROD_ATTRIBUTES, 'plusthick', tep_href_link(FILENAME_ATTRIBUTE_POPUP, 'products_id=' . $all_products['products_id']) . '"target="_blanc"' );
                                 } else {
                                }}

 

 

Link to comment
Share on other sites

×
×
  • Create New...