I need to get a second line of Magento order shipping address, currently I am getting information like so:
$this->formatText($order->getBillingAddress()->getData('prefix')),
$this->formatText($order->getBillingAddress()->getData('firstname')),
$this->formatText($order->getBillingAddress()->getData('middlename')),
$this->formatText($order->getBillingAddress()->getData('lastname')),
$this->formatText($order->getBillingAddress()->getData('suffix')),
$this->formatText($order->getBillingAddress()->getData('street')),
$this->formatText($order->getBillingAddress()->getData('city')),
$this->formatText($order->getBillingAddress()->getData('region')),
$this->formatText($order->getBillingAddress()->getData('country_id')),
All is good, however when customer supplies address line 2, see image below:
My code does not capture that line, anyone knows how to get address line 2 in Magento?
The question was answered on Magento Stack Exchange, here is the answer if anyone is interested:
https://magento.stackexchange.com/questions/164240/magento-how-to-get-order-shipping-address-line-2
Related
in the checkout page, I am trying to pass a variable through step 2 to step 3. I want to check the town of the user and do specific payments methods according to the town of the user.
I tried a lot, but couldn't see the variable. It always returns blank!
In the step 2, (this is the page with the address and everything about the user-client) I did this:
{assign var="town" value="$user_state"}
How can I pass this variable to step 3? (file name is payment_methods.tpl)
*I read something about smarty...
I tried {php} code...
Any help? thanks in advance!
ok I found a solution to my problem.
Inside the step_profile_fields.tpl file, I have done my calculations and capture this variable, for example:
{capture name="state_of_user"}{$ship}{/capture}
In step 4, I have included the previous tpl file (step_profile_fields.tpl)
and grab this value through:
$smarty.capture.state_of_user
For example I have this:
{include file=".." user=$smarty.capture.state_of_user}
if someone need more help. please let me know!
I've read a lot about countrycodes in Magento, but now my question is; where can I find country numbers in Magento? Does this exist? I'm no programmer so I can not edit some code.
We recieved an order from Austria, but somehow Magento sends the number "00" (Holland) to our server where this must be "14" (Austria) as shipping code.
The package was returned to us because this address did not (of course) exist in Holland.
Magento returns standard country codes. You can find the list here;
http://dev.maxmind.com/geoip/legacy/codes/iso3166/
In any of your template files you can echo the current stores country code with this;
$countryCode = Mage::getStoreConfig('general/country/default');
echo $countryCode;
I have a "code39" barcode. How can I get the information from that bar code: product name, manufacturer, and everything else?
Please help.
Find a bar code scanner that reads code 39 encoding--which is just about all of them, and scan the bar code. That number will normally be a GTIN - Global Trade Item Number. You will have to use that number and query some kind of database or web api to get the rest of the product data.
We have a special couponcode 10% off, 3 monhts valid.
Now the 10% goes to charity. And we use the couponcode to identify that it is in fact for charity BUT alas someone has thought up that everybody can decide for themselves which chairt it is. So ....
We need a couponcode that works (check!)
But when entered somewhere there should be an extra box asking for the "charity name"
Options I can think off is directly at coupon input, or add addressfiled (but only when coupon)
Anyone know how to do this easily? or with sme code?
Just create a coupon code for each charity and replace the coupon entrance input with a select box that lists your codes or make a additional select-box that pre-fills the coupon field with right code ?
I need to show 2 prices in different currencies on a flypage, but I haven't found a recipe for it so far. Could anyone help me?
You could probably do this by adding a new input field.
To do this, needs a little coding...
1 - Edit the file default_showprices.php in template folder (/templates/YOUR_TEMPLATE/html/com_virtuemart/productdetails/default_showprices.php)
2 - Get the currency_id ( from virtuemart admin ). For example, I use the US$ currency ID: 144.
3 - Place this code bellow in any line of the file:
echo '<b>US$: '.$this->currency->roundForDisplay($this->product->prices['salesPrice'],144,1,false).'</b>';
This code will print the price converted to US$.