Post by Swimming » Tue May 13, 2025 10:02 pm

Hallo, kann man unter den Kategorien den Bereich "In den Warenkorb legen" so einstellen, dass der Warenkorb erst auf das Produkt geht?
Damit alle weiteren Daten gesehen werden können.

So das der Kunde nochmal über das Produkt bestellen kann.

VG R.

Newbie

Posts

Joined
Thu Apr 24, 2025 8:25 pm

Post by JNeuhoff » Wed May 14, 2025 12:30 am

If your products have options then it is a default behavior, e.g. clicking on the Add to Basket on a product listed on the category page will lead to the product page, and in there the customer will have to choose the options before he can add it to the cart.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by Swimming » Wed May 14, 2025 1:59 pm

Yes, that's correct. Clicking the "Add to Cart" button takes you to the product page. But if an item doesn't require any further options, the order goes directly to the shopping cart. Can this be modified so that the order is always redirected to the product page and additional information, such as product safety information, can be displayed?

Or do you have to set an option for each product?

Newbie

Posts

Joined
Thu Apr 24, 2025 8:25 pm

Post by JNeuhoff » Wed May 14, 2025 7:31 pm

Just a quick thought: Assuming you are using OC 4.1.0.3 or later, modify the file catalog/controller/product/thumb.php:

replace

Code: Select all

$data['cart_add'] = $this->url->link('checkout/cart.add', 'language=' . $this->config->get('config_language'));
with

Code: Select all

$data['cart_add'] = this->url->link('product/product', 'language=' . $this->config->get('config_language') . '&product_id=' . $data['product_id'], true);
I have not tested it, I just took a quick look at the code.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by Swimming » Thu May 15, 2025 4:03 am

Vielen Dank. aber der Fehler sieht im Frontend jetzt so aus:

Code: Select all

Fehler: Undefinierte Konstante "Opencart\Catalog\Controller\Product\this" Datei: /var/www/vhosts/schwimm.store/httpdocs/catalog/controller/product/thumb.php Zeile: 35 Backtrace: 0 Datei: /var/www/vhosts/schwimm.store/httpdocs/system/engine/loader.php Zeile: 112 Klasse: Opencart\Catalog\Controller\Product\Thumb Funktion: Index Backtrace: 1 Datei: /var/www/vhosts/schwimm.store/httpdocs/extension/opencart/catalog/controller/module/featured.php Zeile: 78 Klasse: Opencart\System\Engine\Loader Funktion: Controller Backtrace: 2 Datei: /var/www/vhosts/schwimm.store/httpdocs/system/engine/loader.php Zeile: 112 Klasse: Opencart\Catalog\Controller\Extension\Opencart\Module\Featured Funktion: Index Backtrace: 3 Datei: /var/www/vhosts/schwimm.store/httpdocs/catalog/controller/common/content_top.php Zeile: 101 Klasse: Opencart\System\Engine\Loader Funktion: Controller Backtrace: 4 Datei: /var/www/vhosts/schwimm.store/httpdocs/system/engine/loader.php Zeile: 112 Klasse: Opencart\Catalog\Controller\Common\ContentTop Funktion: Index Backtrace: 5 Datei: /var/www/vhosts/schwimm.store/httpdocs/catalog/controller/common/home.php Zeile: 28 Klasse: Opencart\System\Engine\Loader Funktion: Controller Backtrace: 6 Datei: /var/www/vhosts/schwimm.store/httpdocs/system/engine/action.php Zeile: 96 Klasse: Opencart\Catalog\Controller\Common\Home Funktion: Index Backtrace: 7 Datei: /var/www/vhosts/schwimm.store/httpdocs/system/framework.php Zeile: 259 Klasse: Opencart\System\Engine\Action Funktion: execute Backtrace: 8 Datei: /var/www/vhosts/schwimm.store/httpdocs/index.php Zeile: 20 Funktion: require_once
Funktioniert so nicht.

Newbie

Posts

Joined
Thu Apr 24, 2025 8:25 pm

Post by OSWorX » Thu May 15, 2025 10:14 am

@JNeuhoff & @Swimming

Folks!!
This here is the German Language Forum and therefore the conversation has to be in German!
Please do not start mixing languages - thanks.

@Swimming: wenn es dir besser gefällt in Englisch zu schreiben, dann tue das bitte im entsprechenden, englischsprachigen Forum.

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Administrator

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by OSWorX » Thu May 15, 2025 10:21 am

Generell lässt sich alles anpassen.

Aber, das Problem hier ist .. die verwendete Version.
Da hier eine nicht fehlerfreie verwendet (wenn 4.1.0.3 im Einsatz ? ? >> ist das SO schwer die MIndestanforderungen für Anfragen hier auszuführen siehe viewtopic.php?t=114208), ist die Unterstützung dafür (und diese Anfrage) äußerst "limitiert".

Ansonsten kann jederzeit eine Anfrage im Kommerziellen Forum dafür gestellt werden, die Durchführung dann wenn sich ein Entwickler meldet ist nicht umsonst.

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Administrator

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria
Who is online

Users browsing this forum: No registered users and 2 guests