Frage

This is a weird request from a client, the products can be purchased with or without logos adding on to them. However, when a product which requires a logo is added to the cart the checkout process needs to be slightly different as additional costs will be added afterwards.

I've tried setting a new session in order to store whether the cart has a product which requires a logo in it and using various if statements to overcome this request, example:

            <?php foreach($this->getItems() as $_item): ?>
                <?php
                    $get_attributes = $_item->getProduct()->getTypeInstance(true)->getOrderOptions($_item->getProduct());
                    $attributes = $get_attributes['attributes_info'];
                    foreach($attributes as $attribute) {
                        if($attribute['value'] == 'Has Logo') {
                            $logo_cart = TRUE;
                        }
                    }
                ?>
                    <?php echo $this->getItemHtml($_item) ?>
                <?php endforeach ?>

Using the $logo_cart variable I set it in the core/session, then use:

Mage::getSingleton('core/session')->getLogoCart();

within if statements to change aspects of the checkout.

This is obviously not an ideal way of achieving this, especially since I am currently only setting the session once the customer hits the cart page so it's quite buggy if they're already on the checkout page.

Are there any suggestions on how I can achieve the above? I'm currently using the One Page Checkout module found here: http://www.magentocommerce.com/magento-connect/express-checkout-one-step-checkout.html

One method I've thought about is switching the entire template depending on what's in the cart, but I'm unsure which files I'd need to change within the module to achieve this.

EDIT: Just to clarify, the entire process is to remain the same. I just need to remove a few options from the checkout, such as the shipping method, the review your order section, and display a new area, which are just template changes anyway.

Keine korrekte Lösung

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit magento.stackexchange
scroll top