Cs Cart 3 Admin Report

I've created an addon for CS Cart 3 that adds a custom admin report for my client. Functionality-wise it works perfectly, the page loads on the correct url and outputs the data it's supposed to, I've even managed to add it to the menu.

However, I'm using the standard period selector form and I'm having a couple of problems. Firstly, the dates don't auto-fill in the form after submitting. I got the period to autofill by specifically assigning the post value to $period but no other controllers using the form that I looked at seemed to need that.

The second issue is that the main menu items completely disappear when the form is submitted. I've tried just an empty form and it does the same.

This is my template code


{capture name=“section”}

{include file="common_templates/period_selector.tpl" period=$period form_name="ecs_report_search_form" display="form" but_name="dispatch[ecs_reports]"}

{include file="common_templates/section.tpl" section_content=$smarty.capture.section}

{if $states}

State Sales

{foreach from=$states key=s item=c}


{foreach from=$c item=p key=i}

{$i} {$p}



{foreach from=$totals key=i item=n}


{$i} {$n}
Shipping ${$shippings|number_format:2}
Sales Total ${$sales_total|number_format:2}