Guest Posted June 30, 2017 Posted June 30, 2017 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?
mcmannehan Posted July 8, 2017 Posted July 8, 2017 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...
Guest Posted July 18, 2017 Posted July 18, 2017 Wozu antwortest du dann? Dies scheint nun ein MCMANNEHAN-Forum zu sein, zur Kunden-Anbahnung für deine Firma. Bitte lass das!
mcmannehan Posted July 18, 2017 Posted July 18, 2017 (edited) 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 July 18, 2017 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...
Yepi1533005574 Posted July 28, 2017 Posted July 28, 2017 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.
Yepi1533005574 Posted July 29, 2017 Posted July 29, 2017 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
Yepi1533005574 Posted July 29, 2017 Posted July 29, 2017 (edited) um den preis nicht zu zeigen finde: <h2 id="display_price"><?php echo $products_price; ?></h2> ersätze mit: <h2> <?php if ($products_price > 0.01) { echo $products_price; } else { echo ''; } ?></h2> Edited July 29, 2017 by Yepi
Guest Posted July 29, 2017 Posted July 29, 2017 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.
Guest Posted July 29, 2017 Posted July 29, 2017 Nein, Blödsinn. Keine Buttons zu definieren, sondern 1 Bild in deutsch und 1 Bild in englisch anzeigen lassen.
Yepi1533005574 Posted July 29, 2017 Posted July 29, 2017 (edited) versuchs mal so: echo tep_image(DIR_WS_LANGUAGES . $language . '/' . 'images/button_sold_out.gif '); Edited July 29, 2017 by Yepi
Yepi1533005574 Posted July 29, 2017 Posted July 29, 2017 Die bilddateien in die jeweiligen sprachordner laden
Yepi1533005574 Posted July 29, 2017 Posted July 29, 2017 Du könntest aber auch teile der contrib Ask a question mitverwenden wenn die Produkte im shop nicht verfügbar sind. Wäre auch ne lösung
Guest Posted July 29, 2017 Posted July 29, 2017 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>'; ----------------------------------
Guest Posted July 29, 2017 Posted July 29, 2017 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;
Guest Posted July 29, 2017 Posted July 29, 2017 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. -----------------------------------------------------------
Guest Posted July 29, 2017 Posted July 29, 2017 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');
Yepi1533005574 Posted July 29, 2017 Posted July 29, 2017 (edited) 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 July 29, 2017 by Yepi
Yepi1533005574 Posted July 29, 2017 Posted July 29, 2017 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;
Guest Posted July 29, 2017 Posted July 29, 2017 Hab ich auch schon probiert. Platz bleibt trotzdem leer https://host23.ssl-gesichert.at/vienna1dogshop_at//catalog/index.php?cPath=175&osCsid=5ce04b0a3b34d80a60ca69870fd530cc LG
Yepi1533005574 Posted July 29, 2017 Posted July 29, 2017 Ich bastle mal sobald ich heut abend (nachts) zuhause bin.
Guest Posted July 29, 2017 Posted July 29, 2017 Vielen Dank für deine Mühe! Bin wahrscheinlich erst am Montag wieder online
Guest Posted July 29, 2017 Posted July 29, 2017 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?
Yepi1533005574 Posted July 29, 2017 Posted July 29, 2017 (edited) Dies könnte natürlich sein, Habs mir auch gedacht Edited July 29, 2017 by Yepi
Recommended Posts