Help Zone Customization
I have reviewed the documentation, searched the forums and am still completely stumped. I inherited responsibility for an xCart Gold site and cannot figure out how to customize the content of the Help Zone within the store. Specifically, I am trying to add a link that will show our ordering policies (separate from overall terms of use). Here's what I've learned:
1. The current menu within help zone is populated from a file in the custom skin called help.tpl. This file contains logic for displaying Terms and Conditions so I simply copied this code.
Original code:
<li>
<a href="help.php?section=terms_and_conditions">{$lng .lbl_terms_n_conditions}</a>
</li>
Added code:
<li>
<a href="help.php?section=order">{$lng.lbl_ordering_p olicies}</a>
</li>
I created the lb_ordering_policies variable in the db and now I have a new menu item.
2. When I click on the terms and conditions link I see the main section of the cart replaced with the contents of txt_terms_n_conditions. So, I created a variable called txt_ordering_policies and put the html in there to display the new policy. This made no difference so I did some tracing on other templates.
3. I found that the terms and conditions link was populating the main pane from common_files/customer/help/conditions.tpl which contained the following code (with my added trace):
<h1>{$lng.lbl_terms_n_conditions}</h1>
<p style="display: none;">This is coming from skins/common_files/customer/help/conditions.tpl</p>
<p class="text-block">{$lng.txt_conditions_customer}</p>
But, I could see nothing that would cause this template to be included. Despite that, I created a new order.tpl and added it to the same directory, substituting the new lbl_ and txt_ variables.
This accomplished nothing and, loaded a generic Help-Zone page that was coming from the same directory but in general.tpl.
4. Figuring that there was some logic causing these to load, I found a default template being set for the help section in common_files/common_templates.tpl. The relevant code looks like this:
{elseif $main eq "help"}
{include file="help/index.tpl" section=$help_section}
5. I edited index.tpl and added logic to include my new help section and its template as follows:
{if $section eq "Password_Recovery"}
{include file="help/Password_Recovery.tpl"}
{elseif $section eq "Password_Recovery_message"}
{include file="help/Password_Recovery_message.tpl"}
{elseif $section eq "Password_Recovery_error"}
{include file="help/Password_Recovery.tpl"}
{else}
{include file="page_title.tpl" title=$lng.lbl_help_zone}
{if $section eq "order"}
{include file="help/order.tpl"}
{elseif $section eq "conditions"}
{include file="help/conditions.tpl"}
{elseif $section eq "contactus"}
{include file="help/contactus.tpl"}
{else}
{include file="help/general.tpl"}
{/if}
{/if}
I tried changing code here - for example, I took the last "else" and had it include a file that doesn't exist. This changed nothing.
6. I also looked into static pages which seem to be overridden and have no impact on this problem. I looked at a set of logic in includes/help.php and this seems to do nothing.
I am absolutely at a loss and, if I still had hair, would have pulled it all out by now. If anyone can point me in the right direction I would be indebted.
__________________
xCart Gold 4.4.3
AVATax
|