Jump to content

Modify template to change shipping group label?


Jinpachi
 Share

Recommended Posts

I need some guidance in changing a template to modify a shipping group label, I suspect this might be possible but I am not familiar enough yet with CC or Smarty to get it working.

 

I got a shipping plugin from CubeMods by Goober and it has been a frustrating situations to say the least. After ordering the mod I got no software download link or any responses what so ever to my inquiries from the creator. Only after I filled a dispute with PayPal did I all of a sudden get an automated email with the download link (still no personal communication).

 

Anyway, I installed the thing and came to find out that even though this is a licensed plugin it is branded with this guy's company name and the shipping method has no optional description field.

 

- When disabling shipping groups, the customer is just presented with a shipping amount and nothing more (not very customer friendly IMO)

 

- I figured I could turn on the shipping groups and at least have some indication of what this shipping option is about and find out he has branded the group with his name 'Gworks By Item' (that will make no sense to a customer and very unprofessional from the creator if you ask me)

 

So I went to hunt down where this is coming from and came the conclusion it appears the be hard coded. I checked all plugin settings, all module settings, this plugin has a language group but no phrases and I even sniffed around in the database directly.

 

At this point it is clear to me trying to contact them about this will get nowhere, so I am hoping to apply a dirty fix in the content.checkout.php template. I am using a slightly modified version of bsmither's 'shipping options as radio button' mod instead of the default select:

<div class="update_form required price shipping_radio">
          <span>{$LANG.basket.shipping_select}</span>
          <ul style="list-style-type: none;">
          {foreach from=$SHIPPING key=group item=methods}
          	{if $HIDE_OPTION_GROUPS ne '1'}<li><b><i>{$group}</i></b></li>{/if}
          	{foreach from=$methods item=method}
          		<li><input name="shipping" type="radio" value="{$method.value}" {$method.selected|replace:'selected':'checked'} /> {$method.display}</li>
          	{/foreach}
          {/foreach}
          </ul>
        </div>

Can the templates actually read a value and change it it? Something like this logic:

if ($group = "Gworks by Item") {
   {if $HIDE_OPTION_GROUPS ne '1'}<li><b><i>Shipping Per Item</i></b></li>{/if}
} else {
   {if $HIDE_OPTION_GROUPS ne '1'}<li><b><i>{$group}</i></b></li>{/if}
}

Thanks in advance.

 

 

Link to comment
Share on other sites

Here is what is happening: If CubeCart does not have an admin-supplied descriptive name of this shipping choice (Free Shipping, In-Store Pickup, Courier, etc), CubeCart will use the folder name of the shipping module. In this case, Gworks_by_Item (and with underscores converted to spaces).

 

The GWorks by Item shipping module provides no form input for the admin to enter a descriptive name for this module. Let's add it.

 

In the file modules/shipping/Gworks_By_Item/skin/admin/index.tpl, edit:

Was:
  <fieldset><legend>{$LANG.module.cubecart_settings}</legend>
    <div><label for="status">{$LANG.common.status}</label><span><input type="hidden" name="module[status]" id="status" class="toggle" value="{$MODULE.status}" /></span></div>
  </fieldset>
 
Now:
  <fieldset><legend>{$LANG.module.cubecart_settings}</legend>
    <div><label for="status">{$LANG.common.status}</label><span><input type="hidden" name="module[status]" id="status" class="toggle" value="{$MODULE.status}" /></span></div>
    <div><label for="name">{$LANG.common.name}</label><span><input type="text" name="module[name]" id="name" value="{$MODULE.name}" class="textbox" /></span> {$LANG.module.shipping_name_eg}</div>
  </fieldset>

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...