Get Shipping / Billing Address ID Of An Order Outside Magento Core API?

Aug 30, 2010

I want to get a shipping/billing address id from a just complete order out of Magento.

I have tried the following code but it's not worked:

Mage::getModel('sales/order')->load($array_data["order_id"])->getShippingAddressId()

ADVERTISEMENT

Return An Array Of Billing Addresses And Shipping Addresses In Magento?

Jan 20, 2011

Is there a way to make Magento return a PHP array of all shipping/billing addresses that the logged in user has used in the past?

View 1 Replies View Related

Magento: Filter Order List By Shipping Method?

May 11, 2011

I try to create custom grid with orders shipped by some shipping method (for example TNT). Here is a method where should be a filter:

protected function _prepareCollection()
{
$collection = Mage::getResourceModel($this->_getCollectionClass());
$this->setCollection($collection);
return parent::_prepareCollection();
}

I'm going to use something like addFieldToFilter(), but I don't know field name.

View 2 Replies View Related

Limit Shipping Address Of A Group Of Products To Certain Country In Magento?

Jan 3, 2011

I have to limit the shipping address of music and dvds to only one country in Magento. For example a client has in basket 3 books and a dvd and he selects a country other than allowed, I need a message to be shown: "You have in your basket at least one music or movie product. Distribution rights are limited only to /country/".

View 1 Replies View Related

Billing Address

May 12, 2007

for an e-commerce project, we allow the customer has multiple shipping address in the database. How do you handle the same situation:

approach 1) two tables, customer and address.

customer table will only have the name, account number etc. address table holds the multiple addresses for the customer (including billing and shipping, with a flag telling which address is the billing address.). approach 2) two table, customer and shipping_address. customer table will have the name, account number and billing address. shipping_address table will only have the shipping addresses.

I don't see the obvious advantages and disadvantages in both approaches. I used both. Recently I used the approach 2) more often. Just want to know what do you think? If I can hear from your experience, it might help me to stick with one approach for a long time. Reuse some codes, not switch back and forward between these two approaches.

View 5 Replies View Related

Call A Core Template In Magento?

Sep 13, 2010

I have created list1.phtml in Magento with some changes to the file list.phtml. My problem is that I want to call list1.phtml like list.phtml. I copied the code of list.phtml from catalog.xml and created a new content block for list1.phtml but it doesn't work for me.

I want a page in Magento that only shows 5 product rows, and all other pages are the same with 3 products. I am overriding list.phtml to list1.phtml according to my needs but it doesn't work for me.

View 2 Replies View Related

Magento: Can Two Modules Extend The Same Core Model

Mar 17, 2011

Is it possible to create two modules which extend the same core model like Mage_Customer_Model_Customer?

What will I receive when I access the (overloaded) core model?

View 1 Replies View Related

Magento - Create A Minimum Shipping Charge?

Oct 5, 2010

We use USPS API for international shipping. The API returns a shipping cost and we add % Handling charge. We want to set a minimum charge, e.g., if shipping + handling is less than $5 we want to set the shipping price to $5. Would this require writing a full shipping module or just adapt the USPS module?

View 1 Replies View Related

Integrate Webgistix Shipping Method Into Magento?

Nov 20, 2010

integrate webgistix shipping method into Magento. Is there an extension available for that or should I integrate in customized way ?

View 2 Replies View Related

Multiple Items Same Shipping Consignment In Magento?

Dec 7, 2010

Say I have products 1, 2 and 3. They can all be sent in the same consignment, but with a maximum of 5 per consignment. How do I set it up so that the checkout recognizes this and only applies the shipping once to all of them (max 5)?

For example: One consignment can have 5 items but only from a specific manufacturer. So the shipping cost for 1 item is the same as the cost for 5 items. But 6 items will need to be sent in two consignments so the price is doubled.

1-5 items, £10.00
6-11 items, 20.00 ..

View 3 Replies View Related

Accessing Shipping Cost In Magento's Cart And/or Checkout

Oct 3, 2010

Please note, this question is regarding the shipping cost, not price. There is an important difference, i.e. what $$ charge the shipping method incurs for the store owner, as opposed to what is $$ charge is paid by the customer.

The shipping_tablerate database table includes a cost field, which is populated in the Mage_Shipping_Model_Carrier_Tablerate object during the collectRates method. However, that field is not accessible anywhere else in the stack, e.g. from a quote's address.

I need to access that value on the cart page, and I can't find anyway to achieve it, other than to instantiate a Mage_Shipping_Model_Rate_Request object to pass into collectRates(). That seems unnecessarily inefficient given that the data is already loaded from the table and should be accessible.

I have tried Observing the <shipping_carrier_tablerate_load/> event, but it seems that the _load event is not thrown for that model.

I have also tried accessing the rate from the quote:

$quote = Mage::getSingleton('checkout/cart')->getQuote();
$address = $quote->getShippingAddress();
$rate = $address->getShippingRateByCode($code ='tablerate_bestway');

I can see the calculated price, however cost is not present in that model.

View 1 Replies View Related

In Magento, How Can Put An Items Shipping Cost On The Product Page?

Apr 12, 2011

I want to put a shipping cost on the actual product page in Magento, so customers can see how much it will cost them. I can add in the shipping estimator from the basket page. But all i actually want is a line of text under the product price saying shipping from £XX.XXI have seen this tutorial[URL]....-details-page-in-magento/#comment-10 but it is not working for me on Magento 1.4.2 - i think this an older version is used on this tutorial.I am using a weight based table rate shipping method at the moment, with only one option.EDIT: I worked out the problem in the end: Rather embarrasingly I didnt realise the blog was stripping the formatting out. It was changing the ' to aI can now confirm the code below does display the shipping:

<?php
if($_product->isSaleable())
[code]...........

View 2 Replies View Related

Magento: Multiple Flat Rate Shipping Dependent On Category?

May 17, 2011

Basicily one category set has a slightly higher delivery cost.

I've installed a Multiple Flat Rate extension but I can't figure out how to set a different flat rate if a product in the shopping cart is from a certain category.

At the moment I've set the flat rate to the higher delivery cost and I'm giving all the other categories a 5 discount, which looks very odd at checkout and on the invoice (especially if the product they purchase is less than 5).

Has anyone done this before, know an extension that will do it or could explain how I could do it?

View 2 Replies View Related

Paypal Buy Now Button And Shipping Address?

Nov 27, 2010

I want to setup a simple shopping cart using PHP, only 2 items, I am planning to use paypal buynow button for this, but what about the shipping address details ?, should I collect those details from my site or paypal has such an option so that users can enter shipping address ?

View 1 Replies View Related

Customize The Magento App / Code / Core Folder Without Affecting Future Upgrades?

Feb 18, 2010

I found a guide on how to add new attributes to users, it explains that for this operation I must modify some files in the app / code / core / Mage directory (the directory that contains Magento modules).

But if i make some changes in that folder will this affect future upgrades?

Will an upgrade will delete my changes?

Should I limit the changes only to my modules to not have problems with updates?

View 3 Replies View Related

Get List Of Stores Using The Zip/city In Shipping Address?

Dec 6, 2010

I need to get the list of stores using the zip/city that we specify in the shipping address
( In Admin Panel

System->Configuration->Shipping Settings(In Sales Tab left)->Origin.

)
Is there any way to query Magento to get the list of stores with a particular Zip/city ?

View 1 Replies View Related

Retrieving Single Order In Magento By Increment_id After Editing An Order With Configurable Products?

Apr 28, 2011

I've come across an interesting problem with a Magento store that deals primarily in selling configurable products. I have some code that packages up order information and sends it to an external warehouse who then fulfill the order. With this request, I'm using the increment_id as the identifier. Periodically, we ask the warehouse if the order has shipped and if they report it has, we retrieve the order in Magento via the increment_id and complete the order by creating a new shipment against it.

Now, this works fine until an order is edited. Due to Magento's handling of configurable products, editing an order involves cancelling the current order and recreating it anew with the same increment_id. Subsequently, my interactions based on the increment_id are now scuppered, since only the first (cancelled) order appears to be retrieved when I do something like this, as the increment_id is no longer unique:

<?php
$order = Mage::getModel('sales/order')->loadByIncrementId(100000001);
?>

Ordinarily, having a duplicate increment_id is not possible, so I would have expected Magento to give preference to the 'active' order, but this is not the case. Now, I found a way to get around this with a collection:

<?php
$orders = Mage::getModel('sales/order')
->getCollection()

[code]....

However, I'd be interested to know if there's a way to get just one record back from the collection, negating the need for the foreach.

View 1 Replies View Related

Magento Shipping / Shipment Option A Carrier In The Drop Down List What Class Must Extend To Add The Functionality?

Nov 4, 2010

I have recently created a new shipping module in Magento 1.3.2 with the aid of the Magento developers guide. My module works correctly, however I cant seem to work how to get the functionality for it to become apart of the carriers down down list when a shipment is created within the admin area.

Once I have my carrier in this drop down list, I am going to need to apply additional functionality so that if my carrier is selected when the shipment order is placed then it does a whole heap of things.

So things i need to work out are:

How can make my shipment option a carrier in the drop down list What class must I extend to add the functionality or can I simply add it to my shipment model?

View 2 Replies View Related

Disable Shipping Address Option In PayPal Express Checkout

Nov 26, 2010

Working with the PayPal API and using the Name-Value Pair Interface PHP source codes from SDKs and Downloads: Simplify Integrations with Downloads and SDKs.

My question is similar to "Removing (or prefilling) the address details for PayPal Express Checkout" but I don't want shipping cost/address or anything related about shipping at all.

I keep all shipping details on my system (even sometimes shipping doesn't even apply and there is no charge for it) and I just want user to pay through PayPal without shipping address and shipping cost.

How can I disable shipping part of checkout?

View 2 Replies View Related

Shipping Calculator / Major US Domestic Shipping Services?

Nov 26, 2008

Does anyone know of a freeware shipping calculator for PHP? I do not want anything too fancy, and it can be compatible with any of the major US domestic shipping services.

If anyone knows of one that is a plugin for CodeIgniter that would be nice.

View 5 Replies View Related

Send Shipping Address To Paypal When Using Paypal IPN

Apr 20, 2011

I am trying to integrate Paypal IPN to an application which I am developing. And I am stuck in a problem which is regarding shipping address. I need to know how to send the address variables to Paypal, as a request so that User can see that address on paypal. tell me the variables which should be sent to paypal, which paypal treats as shipping address(or delivery address).

View 1 Replies View Related

Get Order Increment Id In Magento?

Feb 3, 2010

I'm trying to get the Order Increment Id in Magento, on the success.phtml page so that I can use this for affiliate tracking.I'm using the following code, but it is giving an error on the second line;

$order = Mage::getSingleton('sales/order')->getLastOrderId();
$lastOrderId = $order->getIncrementId();

The error reads:Fatal error: Call to a member function getIncrementId() on a non-object on line 34: $LastOrderId = $order->getIncrementId();I was wondering if anyone has any ideas on how to get the Order Increment Id? This is the reference number seen in the admin, usually something like: #1000123

View 4 Replies View Related

Magento API Order Id Vs Increment Id

Jul 12, 2010

I've found that there are two different properties of the order in Magento API available.

order_id and order_increment_id. For sample order they can be something like order_increment_id=100000080 and order_id=81.

The Question Is: What is the difference between them? How they are considered to be used? In the web store UI I see that my order has "Order #" = 100000080. What is order_id property for?

View 3 Replies View Related

Magento Order ID Reorder?

Dec 16, 2010

With set of products in my shopping cart When I login and start an order I get assigned an orderID. If I then sit on my order, or logout and come back again, my cart products is still there and the order ID I was given (potentailly days ago) is still there. In the mean time the there are 100's of orders placed after me. And now am placing my oder means my oder id is before 100 old ID's. These all are good and goes well.

But In the backend, our fulfilment people will have batched well beyond the current ID and my old order ID will get lost in a void(because if i am ordering after one year or so my ID could be 1000 id's Back).

SO, is it possible and easy and safe to force Magento to re-issue a new ORDER ID upon step one of the checkout? If not, can we prevent Magento from remembering your cart state after you logout) or perhaps each time you re-login, whichever is easier?

View 1 Replies View Related

Magento CE - Discount On First Order?

Feb 17, 2011

Is there any plausible way to give a customer a discount on their first order? I imagine it would require the user to sign up for a free account, which is fine. But after that, I'm stumped. The Promotion feature in Magento doesn't cater for anything like this and Google doesn't find any good leads.

View 2 Replies View Related

Api - Execute After New Order In Magento?

May 30, 2010

I'm trying to figure out where I could drop in some PHP code to notify a CRM we are using (Solve360) that a new order has been placed, and that an event should be created (API) to fulfill the order.

Order Product
Checkout
Complete Checkout & Capture CC
Side notify CRM
Done

Not sure where to start, but I have had to make some small tweaks to fix the Quantum Gateway payment processor to work. In that module it appears that the objects for the order (email, amt, details) were available. However it seems it would be quite 'dirty' to insert more PHP code in there.

View 1 Replies View Related

Magento Order State Vs. Status?

Nov 13, 2010

I'm having a fun time figuring out the difference between an order's 'state' versus it's 'status' in Magento. We have a custom flow set up to send out orders to 3rd party fulfillment and we also have some custom logic to check for potentially fraudulent orders and flag them to be manually approved for shipping by an admin user to go out for fulfillment.

I have added a 'Pending Shipment' status, and an 'OK to Ship' status into my module config like so:

<global>
...
<sales>
<order>
<statuses>
<pending_shipment translate="label"><label>Pending Shipment</label></pending_shipment>
<ok_to_ship translate="label"><label>OK To Ship</label></ok_to_ship>
</statuses>.............

...and I use the built in 'Suspected Fraud' status for all of this. The problem is that the 'Suspected Fraud' status is grouped under the state 'Payment Review', and if an order is marked 'Suspected Fraud' or 'Payment Review', the admin doesn't allow you the choice of any other statuses besides those 2. Ideally the 'OK To Ship' option would be available, but grouped under the 'state' of 'Processing'. Here, I have 'OK To Ship' under the 'payment_review' state and it made the option available, but then when I pull down an order and check canShip() -- it fails because it's a 'Payment Review' state status.

View 1 Replies View Related

Delete Test Order From Magento?

Dec 24, 2010

i have made a website in magento. now it is live . now i want to delete the all test order .i know there are some table in all these order are stored. but i dont know the name of those table. if some body has any script which can delete the all the order data.mention the name of all the tables which stores the order information

View 3 Replies View Related

Add A New Field In Address In Magento?

Jun 24, 2011

I need to add 'Email' field in Billing & Shipping address in one-page checkout. I used the below code to add a new field in the database.

$installer = new Mage_Eav_Model_Entity_Setup('core_setup');
$installer->startSetup();
$installer->addAttribute('customer_address', 'ship_email', array([code]...

That field was created successfully. Then I add a new text field with the name ship_email in billing and shipping form. Once I save the form the email didn't save in the database.

View 3 Replies View Related

Generate Text File For Every New Order In Magento?

Dec 1, 2010

how can I generate a text file for each new order in Magento.

View 2 Replies View Related

Magento: Admin Receive Email On New Order?

Nov 1, 2010

Does anyone know if administrators of a magento store receive an email when a new order is created? If so, where/how do I edit it?

View 2 Replies View Related

Magento - Add An Invoice Fee To An Order During Checkout Process?

Dec 21, 2010

How do I add an invoice fee to an order with my payment module? I guess this should be done during the checkout process through my payment method model. Perhaps I should create and add an item/product to the cart/quote/order object?

View 3 Replies View Related

Magento Order Status Change Events?

Jun 15, 2010

I want to change via web service a remote inventory, I know that via Event Observer Method can triger my code, but I don't know which event is useful to complete my task, like on_order_complete, is there an updated list of events or more documentation?

View 3 Replies View Related

Magento Get Products From Category / Order By Rand()?

Dec 4, 2010

I have the following:

$products = Mage::getModel('catalog/product')
->getCollection()
->addAttributeToSort('id', 'RAND()')
->addAttributeToSelect('small_image')
->addCategoryFilter(Mage::getModel('catalog/category')
->load($catId));

But I need to order by id RAND(), how can I do this? (The code shows how I've tried with no luck)

View 2 Replies View Related

Magento Custom Order Attribute/fields?

Oct 8, 2010

I'm building a Magento store using a single catalog over 4 domains: 1 for the US and 3 for Europe (UK, French, and German). There's 1 fulfillment warehouse in Europe, 1 in the US and a sort of unofficial/internal "warehouse" in the US where giveaways and such are fulfilled, and we are not tracking inventory levels in Magento. We need to track particular transaction types like plain web sales along with internal/admin orders like non web sales, giveaways, trade show orders, etc. My plan is to extend the core order model and adding some kind of "order/transaction type" field and then, upon the placement of an order, process the order data and direct which warehouse it is sent off to for fulfillment based on the store id and the 'order type' value.Being new to Magento, I want to know if this kind of setup is a bad idea for any reason. Am I shooting myself in the foot? Is there any reason a single catalog might be problematic? Is there an easier or better way of handling this flow? Is there a way to add custom attributes to orders like you can to products?

View 2 Replies View Related

Magento Get A Product Collection In An Arbitrary Order?

Oct 21, 2010

I have developed a custom search engine for our Magento store and I am trying to load the product collection in a very specific order (I have ranked the results according to an algorithm I designed).

I can load the product collection correctly, however it is not in the order that I would like it to be in. Here is basically how it is working now:

My database query basically comes back with a PHP array of product IDs. For this example lets say it looks like this:

$entity_ids = array(140452, 38601 );

Now I can transpose the 140452 and the 38601 and the product collection comes back in the same order each time. I would like the product collection to be in the same order as the ID of the entity ids.

The code I am using to create my collection is as follows:

$products = Mage::getModel('catalog/product')
->getCollection()
->addAttributeToSelect('*')
->addAttributeToFilter('entity_id', array('in' => $entity_ids))
->setPageSize($results_per_page)
->setCurPage($current_page)
->load();

Is there a way to set the sort order to be the order of the $entity_ids array?

View 2 Replies View Related

Change The Order In Which A List Is Being Brought Together In Our Magento Cart

Jun 23, 2011

I am looking to change the order in which a list is being brought together in our Magento cart.

We have the following coding:

public function getOptionList()
{
$options = false;
if (Mage::getStoreConfig('SCP_options/cart/show_custom_options')) {
$options = parent::getOptionList();
}
if (Mage::getStoreConfig('SCP_options/cart/show_config_product_options')) {
if ($this->getConfigurableProductParentId()) {
$attributes = $this->getConfigurableProductParent()............

We are looking to swap the Attributes and Options over so the Attributes display at the top of the item.In the coding we've established that the top if statement is for options and the bottom if statement is for the attributes, so theory being it should just be a case of swapping them over... unfortunately it doesn't seem as simple as that. If we swap them the attributes don't show but the options do. Would someone be able to recommend anything to try as we're getting very frustrated trying to sort this.

View 1 Replies View Related

Populating A Magento Order Form With Custom Attributes?

Apr 6, 2011

I created an attribute set and added a shirtsize attribute with the options Small, Medium, and Large.

On template/catalog/product/view.phtml, I'm populating a drop down with

<?php
$attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', 'shirtsize');
foreach ($attribute->getSource()->getAllOptions(true, true) as $instance) {
echo '<option>' . $instance['label'] . '</option>';
}
?>

Now, I need to get this data to post with the product_addtocart_form form so I can save their selection with the order and access it on the checkout page / receipt.

How can I accomplish this?

View 1 Replies View Related

Magento - Set Minimum Amount Of Products Per Order For A Category?

Nov 1, 2010

Is it possible to set the minimum number of products required for a category per order in Magento. A client sells wildlife paintings, one of the shop categories is 'cards', it isn't very cost effective to ship less than 6 of these at a time.How would I force a minimum of 6 products from the cards category?

View 4 Replies View Related

Include Product Category In Magento Order Emails?

Dec 16, 2009

I'd like the ability to list the category name alongside the product in the New Order transactional email like shown in the screenshot below.

View 1 Replies View Related

Add An Extra Default Address To Customers In Magento?

May 20, 2011

I'm new to Magento so please forgive me if my question isn't really clear - I can refine it in response to comments if required.Magento has two types of customer address out-of-the-box: billing addresses and shipping addresses. I need to customise it so that there is a third type of address - I'll call this address type a "Return Address" for lack of a better term. I think it needs to be a first-class address - it needs to be treated in the same way as the other default address types.What are the steps I need to perform to make this work?I imagine I need to do at least some of the following actions:Add an installer file with (at least one) $setup->insert(...);Override part of the admin to display the new address type.Override the Customer model object to include new getDefaultReturnAddress() and a couple of other methods.I'm need either a semi-detailed explanation of the process or a link to a good resource describing the process. Unfortunately, the documentation for Magento is lacking and I haven't been able to find anything which points me in the right direction with this so far.

View 1 Replies View Related

Changing Sender's Email Address In Magento?

Dec 9, 2010

Right now when Magento sends new account confirmation, order details, etc. to customers, it goes out from abccompany@bluehost.com. We'd like to send it from support@abccompany.com. How to achieve this?

View 2 Replies View Related

Magento Override Sort Order Of Product List By Subcategories?

Aug 10, 2010

I'm setting up a new store using 1.4.1 I'm trying sort the products in the list by the subcategories they belong to. At the top of list.phtml is

$_productCollection=$this->getLoadedProductCollection();

I tried adding sort filters to that by adding the line

$_productCollection->setOrder('category_ids', 'asc')->setOrder('name', 'asc');

I also tried addAttributeToSort instead of setOrder. This doesn't seem to have any effect. I'm guessing that $_productCollection is not a model I can sort in this manner. I have been digging around trying to find the correct place to apply the sort method without any success.

View 3 Replies View Related

Magento - Getting User Previous Order Products For His Account Page?

Jul 6, 2011

I'm a noob at Magento, but I was wondering if it was possible to get the users previously purchased products in his account pages? Like last time he ordered coke and fanta. He can go to his account page and have a listing of these to re-order them quickly.

View 1 Replies View Related

Magento - Programmatically Reorder The Item Or Create And Add Another Backend Order

Aug 18, 2010

I am currently making a module that requires me to take an order object and make it reorder itself.. thus, creating a new order in the backend with the exact same items and credentials. This is the code that i have thus far it doesn't seem to reorder the item or create and add another backend order.

[Code]...

View 1 Replies View Related

ADVERTISEMENT