New invoice not showing up in ubercart - templates

I'll make this quick because I'm hoping to get it fixed as quickly as possible!
Basically, after making multiple posts asking for assistants creating a invoice template for ubercart, non of which got a reply, I decided to tackle my problam myself.
And that's what I've done. I've uploaded it to "/sites/all/modules/ubercart/uc_order/templates" with the name "uc_order-custom.tpl.php" ( like everyone says on the internet) but when I go to select which template I want to use only 'admin' and 'customer' appear (no 'custom')!
Any idea's why?
It appears, now, that the problem is with the dropdown menu's on the pages; the will not updte! Even if I delete the standard customer template from the directory, the option still appears in the menu but the email is just blank, for obvious reasons! So, I just wondered if it was possible for me to manually code/tell ubercart which template to use for the invoice, instead of relaying on the drop down menu's (if we can't figure out how to update them)?
Thanks in Advance, Andy

Try clearing Drupal's cache. New template files only get loaded when the template cache is cleared.

You need also to copy uc_order.tpl.php to your templates folder.

Related

I am having serious problems customizing my views template to displayblog entries in drupal 7

I am having serious problems customizing my views template to displayblog entries in drupal 7.
please anyone with knowledge of what can help me please reply. i have gone through a couple of drupal documentations but no luck. my field.tpl.php seem to be the only template that actually affect my displays even though i have views-view-field.tpl.php, views-view--blog.tpl.php in the template .
In the view settings, under format, show, make sure you have fields selected, not content.
Under advanced, theme, click information to see which template files are being used, and click rescan if necessary.
If you have created or edited a view, please check under FORMAT section this should be Show:Fields and under Advanced section look for Theme:Information and click onto this, there will be a popup with all possible templates for the display plugin and for the style plugins. All field tpl will be available here those are exists in views fields, you can find your own and use as per your requirement.
When you edit your view open "Advanced" section on the right (collapsed by default) and click on "Information" from "Theme: Information" (last option in that section). There you can see what templates are used (bolded ones) and what could be used instead. You can even click on template description at the beginning of the line, and code will be displayed. Grab that code (copy) and create new template file with one of offered names. Place that template file in your theme and clear the cache. Now you can modify template by your needs.
Also, you even don't have to use all that hierarchy (even that's desirable), but you can i.e. find the template file that are looping over the rows and inside that loop put your html, so lower rank templates won't be included (i.e. template that iterates over fields or even over rows) . Again not so clear solution, but it works for me. I prefer having less template files and I know that nobody will work on that theme except me.

Unable to remove template from sitecore. Getting error "The template is used by at least one item"?

First, I made a backup for all items assigned old templates. Then, I created new templates and all items are assigned with the new templates.
After assigning new templates, there was something problem and I moved back to all items assigned old templates.
Then, I tried to remove the new templates, but Sitecore say that "The template is used by at least one item".
I can assume and check all moved back items and no items are using the new templates.
What is the issue??
Your template is being used by one or more content items. You can see which items it's using via the links menu:
You need to delete all of these content items before you can delete the template. I don't think there is a quick way of doing this unfortunately
I know this is old, but for others that have this issue, yes, the true fix is update the links database so that Sitecore knows the templates aren't actually referenced any longer.
If you actually just wanted to force delete the templates, you can use the SitecoreInstance.com/sitecore/admin/dbbrowser.aspx file to force delete which BYPASSES the built in check.
Note - if you use this to delete, you WILL NOT be able to click on any item (which you're saying there shouldn't be) that actually to refer to the template. You'll have to use the DBBrowser to delete those items as well. Be careful
Also, you could use the Template Usage Reporter sitecore module to determine which items sitecore thinks the current template is being used by.
Additionally - an alternative here is to use sitecore rocks to delete the template - it gives you additional user friendly options. I would run the Broken Links Report after this though - just to make sure things worked out fine.
Delete your standard value of the template :=)

Dynamic Dashlet in Alfresco Share

As a user experience requirement, I need to create a dynamic dashlet.
According to what I need, a dynamic dashlet would be a special dashlet that can load inside "almost every content". I say almost every content because of course this kind of dashlet would have its own limits of course. At the same time, it would be nice that the dynamic dashlet has the ability of being maximized, what in fact would show the real content (for example, an Alfresco page).
Perhaps my question is ambiguous, but the intention to give the user the chance of check execute common functionality inside that special dashlet, this way the user doesn't have to leave the dashboard improving the user experience as a consequence.
Did anybody have had such requirement or similar before? Would that be possible to do?
I would like to know some tips and suggestions in order to find out the right approach.
Thanks in advance.
You could try re-using the webview Dashlet which can also show another page.
The only problem is that not every part which is visible in Share can be accessed via url. Sure the template gets build up by regions of *.ftl's but that doesn't mean you can 'just' view the *.ftl.
The only 'dynamic' thing I see is making a custom page template which shows one or couple of regions which are dynamically build by the url.
e.g. pointing to share/page/customPage?region1=documentlibrary should insert the documentlibrary template within that page and thus it can be shown within the iFrame of the webview Dashlet.
Actually the documentlibrary is a bad example, because there is already a portletMode available for Liferay. But hopefully you'll get my point.

How do I force new users to fill out their User: page when they create a new account on a MediaWiki wiki?

The unnecessary new user mistakes I'm having to revert on the wiki are getting annoying.. Is there any way for me to preload their User:Username with instructions on finding any help they may need and links to places to ask questions, further-more, is there any way to require new users to make three User:Username / User_talk:Username / User_talk:SomeAdmin page edits before editing other pages?
I don't know how to force it, but here is a trick I use:
Download and install the MyVariables extension.
Create a template to use it called {{User name}} - code below.
Include this template in a welcome message on your main page. The user will then see either Welcome <their name> if they have filled it in or Welcome enter your user name if they have not.
Two points on this template:
if they have not entered their name, the text links to a page explaining how to do that (you will need to create this),
if they have entered their name, the text links to MY PREFERENCES where they can update their user data.
Of course, you can change this if that is overkill.
The code:
{{#if:{{CURRENTUSERREALNAME}}|[[MY PREFERENCES|{{CURRENTUSERREALNAME}}]]|[[How to create your user profile on this wiki|enter your user name]]}}<noinclude>
<Add text here explaining the template, or just link to this stackoverflow page!>
[[Category:Template]]
</noinclude>
Another "trick" I've used is using the NewUserMessage extension to ask users to add this information.
Since I have no power to install/remove extensions on this wiki, I had to go with what I have. The wiki has Extension:InputBox installed.. So, I set up Template:Welcome, created a preload, and set up MediaWiki:Welcomecreation with a simple button that does most of the heavy lifting so to speak... It does not actually force anything, but gives all of the needed information and has a similar final output to what I was looking for.

Django -- hide links from certain users

Is it possible, on a Django webapp, to hide certain links from those users who do not have the permission to click the link?
I bet there is a per-link way to check if the user has persmission to click the link, and then show the link (or not) based on that test. However, when there are a lot links spread across a whole bunch of web pages, that can be ridiculously tedious. Are there any ways to achieve this across the whole website with a setting or something?
write a template tag similar to spaceless that goes over its contents and removes all links that are not accessible. this would save you from having to touch each link manually.
It might be possible to write a custom template tag that would accept a link url, reverse it, introspect what permissions were required for the target view, and then conditionally display it.
You'd still have to touch every link in every template that you wanted to make fancy like that, and it would probably be an ugly beast. All in all, it's probably easier if you come up with a more centralized way to control access.