Call-back icon  Sales: Call 877.832.5289 (N America)|310.295.4144 (International)

Magento

eCommerce Software for Online Growth

Magento Forum

   
Page 1 of 2
remove shipping quote, sort of. 
 
lazzymonk
Guru
 
Avatar
Total Posts:  353
Joined:  2008-04-03
England
 

first i just want to say, you guys are great. without the people in this forum i would have given up on magento ages ago.

ok down to the point.

ive made my own shipping module and it works great. to gives the option of a fixed price or collection. but the problem is you still have to click to get a quote in the cart. how would i make it so the shipping prices are automatically displayed, even better would be if i could have one automatically applied too.

any ideas?

thanx guys, and gals

 Signature 

If someone tells you its impossible, try anyway or you will never know.

Currently removing bugs from my blog extension.

 
Magento Community Magento Community
Magento Community
Magento Community
 
lazzymonk
Guru
 
Avatar
Total Posts:  353
Joined:  2008-04-03
England
 

anybody? i can remove the entire quote box but cant figure out how to still get the quotes to show

 Signature 

If someone tells you its impossible, try anyway or you will never know.

Currently removing bugs from my blog extension.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Tweakmag
Sr. Member
 
Avatar
Total Posts:  277
Joined:  2007-08-31
London, UK
 

The problem with what you are asking is that the perosn is not necessarily logged in so how do you know where they will want it shipped too? And even if they are logged in they may wish to ship the goods somewhere else.

Cheers
Adam

 Signature 

adam martin: internet consultant / web developer
contact | adam.martin@internetconsultants.com.au | +61 4 3331 3374 | skype adam.j.martin
http://www.tweakmag.com - Tweaking and Customizing The Magento eCommerce Platform

 
Magento Community Magento Community
Magento Community
Magento Community
 
lazzymonk
Guru
 
Avatar
Total Posts:  353
Joined:  2008-04-03
England
 

because i only ship to one country and the price is fixed for anywhere within that country.

 Signature 

If someone tells you its impossible, try anyway or you will never know.

Currently removing bugs from my blog extension.

 
Magento Community Magento Community
Magento Community
Magento Community
 
lazzymonk
Guru
 
Avatar
Total Posts:  353
Joined:  2008-04-03
England
 

Can I assume this isn’t possible then?

 Signature 

If someone tells you its impossible, try anyway or you will never know.

Currently removing bugs from my blog extension.

 
Magento Community Magento Community
Magento Community
Magento Community
 
John
Member
 
Avatar
Total Posts:  41
Joined:  2007-12-20
Sheffield
 

Lazzymonk, I am trying to do the same thing.  I want there to be a default shipping rate then if I ship to different countries then I can overwrite this. 

I have been able to do up to now..

- Create a shipping module that does the things I need it too.
- Update the shipping and handling each time a product is added to reflect the correct price
- Automatically add the shipping and handling to the cart without hitting the ‘get a quote’ or ‘updating cart’ buttons

Great ... but when I add something to the cart the first time it does not appear… Just if I either add another one or refresh the cart. 

I really need to understand the CartController.

1.  What is the difference between the cart and quote objects.
2.  When a new item is added to the cart for the first time then what is the sequence of objects.  ie is a cart created then converted into a quote or does a quote have a cart in it.
3.  Why is the indexAction() called after the addAction() - ie why is the cart init() called after a product is added to it…
4.  What is Cart and what is a Quote and are they held seperatly in customer session

Can someone shed some light?

Thanks
John

 
Magento Community Magento Community
Magento Community
Magento Community
 
lazzymonk
Guru
 
Avatar
Total Posts:  353
Joined:  2008-04-03
England
 

I would be interested in seeing how you archived this. i did manage to get the shipping to add automatically but i had the same problem as you with it not working for the first item. At that point i gave up on that route thinking it was the wrong way to do it.

Can someone with knowledge of the cart/quote system help us?

 Signature 

If someone tells you its impossible, try anyway or you will never know.

Currently removing bugs from my blog extension.

 
Magento Community Magento Community
Magento Community
Magento Community
 
maiagood
Jr. Member
 
Total Posts:  14
Joined:  2008-04-21
 

I would like to know the same thing.  And I would also like to know how to remove the discount coupon from the checkout page.  This store will have no discount coupons, so it’s irrelevant and distracting.

 
Magento Community Magento Community
Magento Community
Magento Community
 
John
Member
 
Avatar
Total Posts:  41
Joined:  2007-12-20
Sheffield
 

That’s an easy one.  just remove the box that allows you to put it in…

The checkout page is controlled using the checkout.xml file. 

<block type="checkout/cart_coupon" name="checkout.cart.coupon" as="coupon" template="checkout/cart/coupon.phtml"/>

Rgds
John

 
Magento Community Magento Community
Magento Community
Magento Community
 
John
Member
 
Avatar
Total Posts:  41
Joined:  2007-12-20
Sheffield
 

Lazzymonk - did you manage to overload the CartControler or did you use an Event.  I have had real problems with overloading.  When I enable the overload I find that I get a 404 when ‘Proceed to Checkout” Could you (or someone else) paste in a working CartControler overload Config.xml.  I have gone through the Wiki example and it gives the same problem.

Events work fine, just then left with what a Cart / Quote is and how I interact with them.  - see previous post.
Any suggestions, however small on this?

Thanks
John

 
Magento Community Magento Community
Magento Community
Magento Community
 
lazzymonk
Guru
 
Avatar
Total Posts:  353
Joined:  2008-04-03
England
 

I used events. I can never seem to get my head around overloads enough to get them working.

any chance you can post the code your using to get as far as you have. if we are both working on the same base we might be able to get somewhere.

 Signature 

If someone tells you its impossible, try anyway or you will never know.

Currently removing bugs from my blog extension.

 
Magento Community Magento Community
Magento Community
Magento Community
 
John
Member
 
Avatar
Total Posts:  41
Joined:  2007-12-20
Sheffield
 

Sure - I am very creative and am using the code from the estimatePostAction() and the estimateUpdatePostAction() I put this into the addAction() method.  This works after I have added my first product.  These lines are added after

$cart->save();
in addAction() :

$country    = (string) $this->getRequest()->getParam('country_id');
        
$postcode   = (string) $this->getRequest()->getParam('estimate_postcode');
        
$city       = (string) $this->getRequest()->getParam('estimate_city');
        
$regionId   = (string) $this->getRequest()->getParam('region_id');
        
$region     = (string) $this->getRequest()->getParam('region');
        if ( empty(
$country) ) $country 'GB';
        if ( empty(
$postcode) ) $postcode '<PostCode>'// My Postcode
        
if ( empty($city) ) $city '<city>'// My City
        
if ( empty($regionId) ) $regionId '';
        if ( empty(
$region) ) $region '';

        
$this->getQuote()->getShippingAddress()
            ->
setCountryId($country)
            ->
setCity($city)
            ->
setPostcode($postcode)
            ->
setRegionId($regionId)
            ->
setRegion($region)
            ->
setCollectShippingRates(true);
        
$this->getQuote()->save();

        
$code = (string) $this->getRequest()->getParam('estimate_method');
        if (!
$code$code 'tierrate_tierrate';  // My shipping module is called 'tierrate'  
        
if (!empty($code)) {
            $this
->getQuote()->getShippingAddress()->setShippingMethod($code)->save();
        
}

Also I have the following config.xml

<config>
    <
modules>
        <
Charlie_Checkout>
            <
version>0.7.0</version>
        </
Charlie_Checkout>
    </
modules>
    <global>
        <
rewrite>
            <
charlie_checkout_cart>
                <
from><![CDATA[#^/checkout/cart/$#]]></from>
                
<to>/checkout/cart/</to>
            </
charlie_checkout_cart>
        </
rewrite>
    </global> 
    <
frontend>
        <
routers>
            <
charlie_checkout>
                <use>
standard</use>
                <
args>
                    <
module>Charlie_Checkout</module>
                    <
frontName>checkout</frontName>
                </
args>
            </
charlie_checkout>
        </
routers>  
    </
frontend>
</
config>

 
Magento Community Magento Community
Magento Community
Magento Community
 
lazzymonk
Guru
 
Avatar
Total Posts:  353
Joined:  2008-04-03
England
 

ive tested your code. but without any of the config.xml changes and it seems to work great. the shipping is being added as soon as the first item is added, and updated as soon as something new is added. but at the moment im only using fixed rate per item shipping.

maybe the problem is with your shipping module. But from what i have found is that they either work or dont, there is no sort of work with them.

 Signature 

If someone tells you its impossible, try anyway or you will never know.

Currently removing bugs from my blog extension.

 
Magento Community Magento Community
Magento Community
Magento Community
 
John
Member
 
Avatar
Total Posts:  41
Joined:  2007-12-20
Sheffield
 

Could be… Could you check after your session has been cleared - server session.  The sessions are in var/session - or open up a new browser.

I’ll try with a standard module again to see if I still have the problem.

Thanks
John

 
Magento Community Magento Community
Magento Community
Magento Community
 
John
Member
 
Avatar
Total Posts:  41
Joined:  2007-12-20
Sheffield
 

Ok update - I have just checked using flat rate and updating the $code line to ‘flatrate_flatrate’ and the sequence is ...

Clear sessions from var/sessions directory
Go to Catalog page
Click ‘Add to cart’
Shopping cart empty...sob sob
Click ‘continue shopping’ and go to Catalog page again
Click ‘Add to cart’
Product appears in cart with correctly calculated S&H;(P&P;) - yer woohoo

Good news though : I have figured out why there seems to be two passes of the CartController The first one is to add the product - addAction() - then once that is complete there is a redirect to the Cart screen so this time it goes through the indexAction()

Rgds
John

 
Magento Community Magento Community
Magento Community
Magento Community
 
lazzymonk
Guru
 
Avatar
Total Posts:  353
Joined:  2008-04-03
England
 

On retesting thats the same result im getting. At least we are getting somewhere now though.

 Signature 

If someone tells you its impossible, try anyway or you will never know.

Currently removing bugs from my blog extension.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
Page 1 of 2
 
Sales: Call 877.832.5289 (North America) 310.295.4144 (International)
© Copyright 2008 Varien. Magento, eCommerce software, is a trademark of Irubin Consulting Inc. DBA Varien
Privacy Policy|Terms of Service
Magento Community Count
53191 users|720 users currently online|107221 forum posts