One of the tokens available is [store-url], how ever on the store settings page, there is nowhere to edit it from the default $base_url. It would be ideal to be able to change this so that, for example, when a role renewal email is generated with a store link in it, a user is able to link directly to where they need to renew their membership versus going to the frontpage.

The attached patches attempt to provide this functionality. So far it works well.

CommentFileSizeAuthor
uc_store.admin_.inc_.diff847 bytespcorbett
uc_store.module.diff807 bytespcorbett

Comments

tr’s picture

Status: Needs review » Needs work

I don't get it. [store-url] might be used in many contexts. I don't see that it would be appropriate to let the admin set it to a role-renewal link.

You can set your own role-renewal message to be whatever you like, using whatever tokens you like. So for example your message could say:

Visit <a href="[store-url]/renew/this/role/now">our site</a> to renew your membership.

[store-url] isn't even used in the default messages, so if the link in your role-renewal message is wrong it's because you're trying to use the token in the wrong way, not because the token contains the wrong information.

pcorbett’s picture

That's fine, but why have a [store-url] token then? It implies that it will link someone to their store's URL (whatever that means). The casual Drupal user won't know how to extrapolate. I think there already is a base url token, so have two tokens that are identical doesn't make much sense.

tr’s picture

That's a reasonable question. I don't know why that was done.

chrisfromredfin’s picture

Seems like if having it just be base-url is, as you say, a little wonky. I have had customers that have web sites that are mostly brochure-type content, but then they have a store. The store more or less just starts at /products for example. Doesn't it make sense that base-url is / and store-url would be /products? I understand your argument TR, of course, but I just think that it might make more sense to leave it as a configurable token than to remove it altogether, and just default it to base-url. Just my $0.02.

longwave’s picture

Version: 6.x-2.2 » 7.x-3.x-dev
Status: Needs work » Active

There is little point changing this now in 6.x, but perhaps we should just remove [store:url] in 7.x.

Island Usurper’s picture

Yeah, core has a better version for the site url anyway, so lets just ditch [store:url].

longwave’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.