On the "admin/store/settings/node-checkout/settings" page, under "order product display", you can check "add to the default node cart teaser using these settings" to alter the appearance of the product descriptions on the order view page. I would like to create a link back to the Node Checkout nodes, but I'm unable to use the HTML input format here.

Here are my settings:

Order product attribute:
Registration form

Order product option:
[title]

This outputs the following on the order view page:
Registration form: My Node Title

Is there any way I can force this to render as HTML instead of plain text? It would be really nice if the order view page provided links back to all of the Node Checkout nodes that are attached to products in the order. This would make it easier for admins to stay organized.

Can I achieve this by implementing the theme_uc_node_cart_teaser() function? Does this function affect the order view page, or just the cart view page?

Thank you!

Comments

Anonymous’s picture

Sorry, I forgot to wrap some of the HTML in code tags. Here's the post again. Can you please delete the first one?

On the "admin/store/settings/node-checkout/settings" page, under "order product display", you can check "add to the default node cart teaser using these settings" to alter the appearance of the product descriptions on the order view page. I would like to create a link back to the Node Checkout nodes, but I'm unable to use the HTML input format here.

Here are my settings:

Order product attribute:
Registration form

Order product option:
<a href="/node/[nid]">[title]</a>

This outputs the following on the order view page:
Registration form: <a href="/node/298">My Node Title</a>

Is there any way I can force this to render as HTML instead of plain text? It would be really nice if the order view page provided links back to all of the Node Checkout nodes that are attached to products in the order. This would make it easier for admins to stay organized.

Can I achieve this by implementing the theme_uc_node_cart_teaser() function? Does this function affect the order view page, or just the cart view page?

Thank you!

b0b’s picture

Subscribing. Would also like this feature added.

eheuvel’s picture

Subscribing. Same here.

almiesel’s picture

I am stuck with exactly the same problem, would be great if someone has an answer or a hint where to look to change theming.

almiesel’s picture

I made something who everybody would probably kill me for ;) but I am not a coder just a Drupal Costumizer ;)

I put this code in the header of my page.tpl.php

  <script type="text/javascript">
function MyHead() {
var list = new Array();
list[0] = "&lt;^<";
list[1] = "&gt;^>";

var j, k, find, item, repl;
var page = document.body.innerHTML;
for (var i=0; i<list.length; i++) {
item = list[i].split("^");
find = item[0];
repl = item[1];

while (page.indexOf(find) >= 0) {
var j = page.indexOf(find);
var k = find.length;
page = page.substr(0,j) + repl + page.substr(j+k);
}
}
document.body.innerHTML = page;
}
</script>

and this in the body tag

onload="MyHead();

and under
http://YOURSITE.COM/admin/store/settings/node-checkout/settings

I put this little piece

<a href='/node/[nid]' target='blank' class="linkToOrder">Zur Ansicht</a>

somehow some strange link is coming up but this is covered with css ;)

But in the end it work to get the link to the node related to the order

Rene Hostettler’s picture

Tried this patch http://drupal.org/node/418238 but was having some weird bugs worked very well for a bit and then started getting an node is not a product error a day or so after patching. Not sure if it is cause by the patch or another custommodule I am using to add an additional save instead of add to cart button.

In my case I used jquery and then did a replaceWith to make it a link on the order page. For anyone that is looking for a quick and dirty solution

Set Order product option:
[nid]

Remove the id label

Then add this code inside your header or separate script file.

$(document).ready(function(){
var myvar = $(".order-pane-table .first").text();
myvar = myvar.replace(/: /i, "");
$('.order-pane-table .first').replaceWith('<li><a href="/node/'+myvar+'" >View Order Details</a></li>');
 });

In my use case using another module to restrict the cart to only a single product at a time so you may need to tweak if you have multiple products.

aidanlis’s picture

Status: Active » Postponed

If you'd like to sponsor this feature please reopen this issue.