I want to simply add a phone number where the “US Dollars” and “English” words are to the right of the mini cart bar in the default Austere template. Attached screenshot highlights in red the area I want to change.
How would I do this and is it possible to make this as a hook in my changes so it won't be overwritten?
[attachment=4386:screenshot.jpg]
There are two ways to do this.
First, just edit skins/your-skin/customer/top.tpl
Below:
{if $currencies|sizeof > 1}
{/if}
Add:
Or create a file called skins/your-skin/customer/addons/my_changes/hooks/index/main_content.override.tpl
In that file put:
```php
{hook name="index:user_info"}
{assign var="escaped_current_url" value=$config.current_url|escape:url}
{if !$auth.user_id}
{$lang.sign_in}
{$lang.or}
{$lang.register}
{else}
{if $user_info.firstname && $user_info.lastname}{$user_info.firstname} {$user_info.lastname}{else}{$user_info.email}{/if}
({include file="buttons/button.tpl" but_role="text" but_href="auth.logout?redirect_url=`$escaped_current_url`" but_text=$lang.sign_out})
{/if}
{if $settings.General.secure_auth != "Y"}
{include file="views/auth/login_form.tpl" style="popup" form_name="login_popup_form" id="popup"}
{/if}
{/hook}
{include file="common_templates/search.tpl"}
{include file="views/checkout/components/cart_status.tpl"}
{if $localizations|sizeof > 1}
{/if}
{if $languages|sizeof > 1}
{/if}
{if $currencies|sizeof > 1}
{/if}
Of course you might want to style the number to fit your site.
Hope that helps,
Brandon
Thanks, that works great. Also, I was experimenting with putting the google plus one button in this space, but when I do, it causes a smarty error. Any idea how I could get the google plus one button to work in this area since it's a script?
[quote name='knoxbury' timestamp='1311777799' post='118364']
Thanks, that works great. Also, I was experimenting with putting the google plus one button in this space, but when I do, it causes a smarty error. Any idea how I could get the google plus one button to work in this area since it's a script?
[/quote]
Never mind, I just figured it out . . . encompass the plus one code with the {literal} tag.
[quote name='knoxbury' timestamp='1311777895' post='118365']
Never mind, I just figured it out . . . encompass the plus one code with the {literal} tag.
[/quote]
Thank you for the informative post as this worked! Cheers!