Show fax number in email (Opencart) - php

I'm using OpenCart v. 1.4.9.3 and I'm trying to put the customer's fax number in the confirmation email. I've tried putting the following in the order_confirm.tpl template, but no avail:
Fax <strong><?php echo $customer_fax; ?></strong><br />
Do I need to modify the controller? I'm still a newbie at OpenCart.

You will need to edit the Model actually as well as the edit you have already done
/catalog/model/checkout/order.php
Find
$template->data['customer_telephone'] = $order_query->row['telephone'];
After it put
$template->data['customer_fax'] = $order_query->row['fax'];

Related

Product description in transactional email Magento

I am using magento 1.9.1 and the e-mail templates. I came with the following code, which should display the product description in transactional e-mails.
<?php echo $this->escapeHtml($_item->getDescription()) ?>
However it does not do that. Does anyone know if somewhere else in the code the description must be loaded first?
Greetings, Marcel
Try Using
<?php $_product = Mage::getModel('catalog/product')->load($_item->getProductId());?>
<?php echo $_product->getDescription();?>

I need to add WooCommerce provided code in my custom html

I recently purchase Woo Commerce Follow up Email extension and I want to add "Sign-ups, Subscriber Lists, and Email Newsletters" they provide the code
[fue_subscribe label="Email:" placeholder="Your email address" submit_text="Subscribe" success_message="You have been subscribed!"]
The above code working fine on widgets and post/pages but when I add the code in my custom it not works
Can anyone please tell me how to add this type of Wordpress code in custom HTML or PHP
Many thanks
try this inside your theme file:
echo do_shortcode( '[fue_subscribe label="Email:" placeholder="Your email address" submit_text="Subscribe" success_message="You have been subscribed!"]');

Changing Virtuemart Checkout Page Shipping address label

Please check this page:
https://newbabyhampers.com.au/index.php/checkout
I need to change the label of Shipment Addresses to Shipment address. I am using VM2 for this site. I have searched in all language files. But I cant find any HTML code or Language file text. I have also activated IceVMcart module. I really need to deliver this site soon. Where can I edit this label?
The output is overridden, please check:
templates/*your_template/html/com_virtuemart/cart/default_pricelist.php
*your_template = your active template name
The default value is: <?php echo JText::_ ('COM_VIRTUEMART_USER_FORM_SHIPTO_LBL'); ?>
You could create a language override for this variable using:
Extensions -> Language Manager -> Overrides
Good Luck!
I have found the solution
I have edited 'en-GB.com_virtuemart.ini' in public_html/administrator/language/en-GB. All I needed to do was to change the COM_VIRTUEMART_USER_FORM_SHIPTO_LBL Label -> 'Shipment Address'. Thanks everyone for help.

how can I display opencart total on external web page from cart

How can I display the $total on an external web page from opencart. The web page and opencart are on the same server but opencart is installed in a sub folder. I would like to display the Total and a link back to opencart. I have the link as follows so far:
<div id="topcart">
<p>
<span class="cartamt">$123.00</span>
<img src="/images/icon-cart.png" alt="Cart" />
</p>
</div><!-- end div topcart -->
I just need to replace the 123.00 with the actual total amount in opencart.
Thanks,
Robert Campbell
The simplest way to do this would be to save the total as getTotal() is called in the cart class to a session variable, and then use the session variable in that page (assuming they are on the same domain and using the same session). To set the session variable, use
$this->session->data['currentTotal'] = $total;
Just before return $total; in system/library/cart.php. Adding currency formatting gets a little more tricky. You instead need to use
global $registry;
$this->session->data['currentTotal'] = $registry->get('currency')->format($total);
After that, in your non OC page start a session if it's not already started, and add
<?php echo empty($_SESSION['currentTotal'] ? '$0.00' : $_SESSION['currentTotal']); ?>
In the place of your $123.00
To anyone else trying to find this answer it's simple. Edit the system/library/cart.php file like jay says but when getting the total use
$_SESSION['default']['currentTotal'] instead.

Magento Track shipment link on order view page not showing

I am unable to get the link to show up on admin end! My client is very irked by it missing. Any ideas?
The file adminhtml/default/default/template/sales/order/view/tab/info.phtml has the following code:
<?php if ($_order->getTracksCollection()->count()) : ?>
<?php echo $this->__('Track Order') ?>
<br/>
<?php endif; ?>
adminhtml/default/your_template_name/template/sales/order/view/tab/info.phtml‌​ also has the same code.
I found out that the program formerly written by another programmer was not uploading the tracking numbers from the warehouse to the correct location in admin. It was adding it to the comments but not to the Shipment section. Once I fixed some code in the program to add the tracking numbers, all issues related were solved. Feel free to contact me if you need some help.

Categories