Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Warenkorb teilweise ausblenden


Guest

Recommended Posts

Liebe Comunity,

ich möchte manche Artikel nicht im online-shop anbieten, jedoch für Selbstabholer im lokalen Geschäft trotzdem zeigen.

Der IKEA hat das so gelöst, dass er den Button WARENKORB ausblendet und dafür

ein Bild NICHT ONLINE VERFÜGBAR zeigt.

Ist es möglich den Warenkorb teilweise aus zu blenden?

Wie habt ihr das gelöst?

 

Link to comment
Share on other sites

Programmierung ist angesagt und dies ist leider nicht kostenlos zu machen.

  • 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

  • 2 weeks later...

Wozu antwortest du dann?

Dies scheint nun ein MCMANNEHAN-Forum zu sein,

zur Kunden-Anbahnung für deine Firma.

Bitte lass das! 

Link to comment
Share on other sites

Du benutz diese Forum um alles kostenlos zu bekommen. Sowas geht eben nicht immer!!!

wenn sonst keiner antwortet.... heißt das definitiv -> keiner hilft kostenlos

Viel Spass weiterhin

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

  • 2 weeks later...

Hi, Versuchs mit Mengenangabe.

Wenn das Produkt auf 0 steht ist es eben nicht verfügbar und somit kannst du es zwar im shop anzeigen lassen aber nicht bestellen. In der Abfrage dann mit if am bestellbutton den Hinweis ausgeben dass eben nur im laden gekauft werden kann.

LG.

Link to comment
Share on other sites

auf jeden fall geht es wenn du den preis bei entsprechendem produkt auf 0,00 setzt.

+++++++++++++++++++++++++++++++++++++++++

finde in der product_info.php

<?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?>

und tausche gegen:

<?php
if ($products_price > 0.01)

echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary');
}
else
{
echo tep_image(DIR_WS_IMAGES . 'hier_dein_hinweisbild.png', STORE_NAME);
}
?>

anschliessend erstellst du ein bild, mit entsprechendem hinweis und lädst es in den images ordner.
als beispiel "hier_dein_hinweisbild.png"

LG. Pit

Link to comment
Share on other sites

Danke für die Anregung.

Ich denke dies über die Mengenangabe (Menge =0) zu spielen ist einfacher.

Möchte schon, dass der Kunde den Preis sieht auch wenn nicht bestellbar ist. Wenn ich den Preis auf 0 stelle, so muss ich bei wieder-lieferbar wieder den Preis aus der Liste raussuchen und eingeben...

 

Was denkst du über:

Admin -> Konfiguration -> Stock -> check stock level = true

Admin -> Konfiguration -> Stock -> allow checkout = false

Buttons:

product_listing:

if($listing['products_quantity']>0) {

$prod_list_contents .= ' <tr><td align="center">' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id'])) . '</td>';

}else{

$prod_list_contents .= ' <tr><td align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_draw_button (IMAGE_BUTTON_NOT_AVAIL, 'info') . '</a></td>';

}

break;

product_info:

<?php

if($product_info['products_quantity']>0) {

echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary');

}else{

echo tep_image (DIR_WS_IMAGES . "button_sold_out.gif");

}

-----------------------

Da mein shop aber 2-sprachig ist, müsste ich den Button noch definieren.

 

Link to comment
Share on other sites

Ojeh, funzt nicht.

Da ich ein Addon (GRID or LIST) in meiner product_listing.php eingebaut habe,

kann ich den neuen code nicht so einfach einbauen.

---------------

case 'PRODUCT_LIST_BUY_NOW':
            $prod_list_contents .= '        <td align="center">' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id'])) . '</td>';
            $prod_list_grid .= '<br>' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']),'primary');
            break;
        }
      }

      $prod_list_contents .= '      </tr>';
      $prod_list_grid .= '</td>';
    }

    $prod_list_contents .= '    </table>' .
                           '  </div>' .
                           '</div>';

----------------------------------

Link to comment
Share on other sites

Ich bastle noch...

Habs geschafft, dass jetzt auf der product_listing.php gar kein Buton mehr angezeigt wird, was ja blöde ist, mit folgenden code, bitte kann wer checken? Danke!

case 'PRODUCT_LIST_BUY_NOW':
                if($listing['products_quantity']>0) {
            $prod_list_contents .= '        <td align="center">' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id'])) . '</td>';
            $prod_list_grid .= '<br>' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']),'primary');
 }else{

$prod_list_contents .= ' <tr><td align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_draw_button (IMAGE_BUTTON_NOT_AVAIL, 'info') . '</a></td>';

}
                  
            break;

 

Link to comment
Share on other sites

Die product_info.php oberhalb

hatte einen Syntax-Fehler.

Hier der richtige code, der funktioniert:

-------------------------------------------------------

find:
    <?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?>

  replace with:
<?php

if($product_info['products_quantity']>0) {

echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary');

}else{
  echo  tep_image(DIR_WS_LANGUAGES . $language . '/' . 'images/button_sold_out.png ');
         }
?>

------------------------------------------------------

Bilder

button_sold_out.png  

erstellen und in den jeweiligen Sprachdateien laden.

-----------------------------------------------------------

 

 

Link to comment
Share on other sites

vor 48 Minuten, BoniChipsy said:

Ich bastle noch...

Habs geschafft, dass jetzt auf der product_listing.php gar kein Buton mehr angezeigt wird, was ja blöde ist, mit folgenden code, bitte kann wer checken? Danke!

case 'PRODUCT_LIST_BUY_NOW':
                if($listing['products_quantity']>0) {
            $prod_list_contents .= '        <td align="center">' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id'])) . '</td>';
            $prod_list_grid .= '<br>' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']),'primary');
 }else{

$prod_list_contents .= ' <tr><td align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_draw_button (IMAGE_BUTTON_NOT_AVAIL, 'info') . '</a></td>';

}
                  
            break;

 

Warum funktioniert der Befehl ELSE nicht?

wo liegt der Fehler?

Zur Zeit zeigt es weder den Warenkorb-Button noch den Button NOT AVAILABLE an.

Habe den neuen Button in der german.php definiert:

define('IMAGE_BUTTON_NOT_AVAIL', 'Nicht online verfügbar');

Link to comment
Share on other sites

Die bilddateien in die jeweiligen sprachordner laden heisst ein bild erstellen als gif datei abspeichern und in den ordner ../languages/sprachordner/images/ laden

zumindest bei der product_info.php 

 

<?php

if($product_info['products_quantity']>0) {

echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary');

}else{
  echo  tep_image(DIR_WS_LANGUAGES . $language . '/' . 'images/button_sold_out.png ');
         }
?>

Edited by Yepi
Link to comment
Share on other sites

case 'PRODUCT_LIST_BUY_NOW':
                if($listing['products_quantity']>0) {
            $prod_list_contents .= '        <td align="center">' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id'])) . '</td>';
            $prod_list_grid .= '<br>' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']),'primary');
 }else{

$prod_list_contents .= ' <tr><td align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_LANGUAGES . $language . '/' . 'images/button_sold_out.png ') . '</a></td>';

}
                  
            break;

Link to comment
Share on other sites

Nur so ein Gedanke...

Kann es sein, dass die product_listing.php den Warenbestand stock gar nicht abgreift

und sie deshalb mit dem Befehl nichts anfangen kann?

Link to comment
Share on other sites

×
×
  • Create New...