Jump to content

 

TVKevin

Member Since 17 May 2012
Offline Last Active Apr 01 2013 06:44 PM
-----

Topics I've Started

No controller for: _no_page

20 March 2013 - 04:42 PM

We are currently developing our site internally on a LAN IP but have moved into the public testing faze. A CNAME was created on our domain and pointed to the CS-Cart installation to do testing from outside of our network. The config.local file was also updated to reflect this and my 000-default file in my apache2 configuration had it's ServerName line updated as well.

When I access the administration panel at the new URL I am able to use it just fine, but when I try to access the front end of our store I receive a blank page stating the following:

No controller for: _no_page

I can still access the front end by using our internal IP address and everything is fine, but I cannot do it using the new domain.

What is going on?

More Information on the .ceDialog Function

07 August 2012 - 01:12 PM

During development I've come across numerous references to .ceDialog being used to launch dialogs, in my case, launching a 2nd dialog from within a 1st one. It seems that the method is to append an empty DIV to the body and then run .ceDialog on that element, passing in the content via the href option.

My question is this: What is ceDialog and where can I find some more documentation on it? More specifically, I'm looking for the options I can pass to the function when opening a dialog window. My problem is that when opening a WYSIWYG text editor inside a dialog, the content does not load into the text editor on the first try. I have to close the dialog and reopen it to actually see the content. Since the container DIV is created initially on the first click, I'm thinking it may launching the dialog before the content itself is fully rendered and maybe there are some options I need to pass along that I am unaware of.

Any help would be appreciated. Thanks!

Admin Panel Product Page - Save buttons not working

10 July 2012 - 01:17 PM

Hey I am having a problem with the admin panel product page.

I am working on a document manager addon and it has 2 separate but similar views to manage documents.

One is a standalone page that you can access in the admin menu under the Website section, which is used to manage all of the documents, and then there is another view on the product page which is breaking everything.

Because the 2 'views' are the same template, one is just filtering things out based on the product, I am trying to use the same template files for both.

The default document manager page that you access from the menu (and not a product page tab), works fine. The document manager forms and buttons work fine on the tab page also, but when you are on the product page, you can't save on any tab.

I should also mention that the form/button issue, is based in a popup window from the main script. I don't know if any of those particular template files would mess anything up?

I included the 2 template files that I am working with, can anybody spot anything that would break the product page save buttons?

<div id="content_group{$documentDetails.document_id}">
<form action="{""|fn_url}" method="post" name="manage_documents" class="cm-form-highlight cm-disable-empty-files{if ""|fn_check_form_permissions} cm-hide-inputs{/if}" enctype="multipart/form-data">
  <input type="hidden" class="cm-no-hide-input" name="redirect_url" value="tv_documentmanager.manage_documents" />
  <input type="hidden" class="cm-no-hide-input" name="doc_id" value="{$documentDetails.doc_id}" />
  <fieldset>
	<div class="form-field">
	  <label class="cm-required" for="document_data[product]">Product:</label>
	  <select name="document_data[product]" id="document_data[product]">
		{foreach from=$doc_products item=product}
		  <option value="{$product.product_id}"{if $documentDetails.product_id == $product.product_id || $product_filter == $product.product_id} selected{/if}>{$product.product}</option>
		{/foreach}
	  </select>

	</div>
	<div class="form-field">
	  <label class="cm-required" for="document_data[type]">Type:</label>
	  <select name="document_data[type]" id="document_data[type]" class="input-text-large main-input">
		<option value="sales"{if $documentDetails.doc_type == "sales"} selected{/if}>Sales Sheet</option>
		<option value="assembly"{if $documentDetails.doc_type == "assembly"} selected{/if}>Assembly Sheet</option>
		<option value="other"{if $documentDetails.doc_type == "other"} selected{/if}>Other</option>
	  </select>
	</div>
	<div class="form-field">
	  <label class="cm-required" for="document_data[file]">File:</label>	  
	  {include file="common_templates/fileuploader.tpl" var_name="document_data[file]"}
	</div>
  </fieldset>
  <div class="buttons-container">
	{if !$documentDetails|fn_allow_save_object:"document" && $mode != "add"}
	  {assign var="hide_first_button" value=true}
	{/if}
	{include file="buttons/save_cancel.tpl" but_name="dispatch[tv_documentmanager.manage_documents]" cancel_action="close" hide_first_button=$hide_first_button}
  </div>
</form>
</div>
<div id="content_group{$templateDetails.template_id}">
<form action="{""|fn_url}" method="post" name="manage_documents" class="cm-form-highlight cm-disable-empty-files{if ""|fn_check_form_permissions} cm-hide-inputs{/if}" enctype="multipart/form-data">

  <input type="hidden" class="cm-no-hide-input" name="redirect_url" value="tv_documentmanager.manage_documents" />
  <input type="hidden" class="cm-no-hide-input" name="template_id" value="{$templateDetails.template_id}" />

  <fieldset>
	<div class="form-field">
	  <label {if $mode eq "add"}class="cm-required" {/if}for="template_data[product_id]">Product:</label>
	  {if $mode eq "add"}
	  <select name="template_data[product_id]" id="template_data[product_id]">
		{foreach from=$doc_products item=product}
		  
		  <option value="{$product.product_id}"{if $templateDetails.product_id == $product.product_id || $product_filter == $product.product_id} selected{/if}>{$product.product}</option>
		{/foreach}
	  </select>
	  {else}
		{foreach from=$doc_products item=product}
		  {if $templateDetails.product_id == $product.product_id || $product_filter == $product.product_id}{$product.product}
		  <input type="hidden" name="template_data[product_id]" id="template_data[product_id]" value="{$product.product_id}" />
		  {/if}
		{/foreach}
	  {/if}
	</div>
	<div class="form-field">
	  <label class="cm-required" for="template_data[product]">Product Code:</label>	  
	  <input type="text" name="template_data[product]" id="template_data[product]" value="{$templateDetails.product}" />
	</div>
	<div class="form-field">
	  <label class="cm-required" for="template_data[size]">Size:</label>	  
	  <input type="text" name="template_data[size]" id="template_data[size]" value="{$templateDetails.size}" />
	</div>
	<div class="form-field">
	  <label class="cm-required" for="template_data[shape]">Shape:</label>	  
	  <input type="text" name="template_data[shape]" id="template_data[shape]" value="{$templateDetails.shape}" />
	</div>
	<div class="form-field">
	  <label class="cm-required" for="template_data[layout]">Layout:</label>	  
	  <input type="text" name="template_data[layout]" id="template_data[layout]" value="{$templateDetails.layout}" />
	</div>
	<div class="form-field">
	  <label class="cm-required" for="template_data[print_width]">Print Width:</label>	  
	  <input type="text" name="template_data[print_width]" id="template_data[print_width]" value="{$templateDetails.print_width}" />
	</div>
	<div class="form-field">
	  <label class="cm-required" for="template_data[print_height]">Print Height:</label>	  
	  <input type="text" name="template_data[print_height]" id="template_data[print_height]" value="{$templateDetails.print_height}" />
	</div>
	<div class="form-field">
	  <label class="cm-required" for="template_data[data_width]">Data Width:</label>	  
	  <input type="text" name="template_data[data_width]" id="template_data[data_width]" value="{$templateDetails.data_width}" />
	</div>
	<div class="form-field">
	  <label class="cm-required" for="template_data[data_height]">Data Height:</label>	  
	  <input type="text" name="template_data[data_height]" id="template_data[data_height]" value="{$templateDetails.data_height}" />
	</div>
	<div class="form-field">
	  <label class="cm-required" for="template_data[smart_product]">Smart Product:</label>	  
	  <input type="text" name="template_data[smart_product]" id="template_data[smart_product]" value="{$templateDetails.smart_product}" />
	</div>
	<div class="form-field">
	  <label class="cm-required" for="template_data[smart_option1]">Smart Option 1:</label>	  
	  <input type="text" name="template_data[smart_option1]" id="template_data[smart_option1]" value="{$templateDetails.smart_option1}" />
	</div>
	<div class="form-field">
	  <label class="cm-required" for="template_data[smart_option2]">Smart Option 2:</label>	  
	  <input type="text" name="template_data[smart_option2]" id="template_data[smart_option2]" value="{$templateDetails.smart_option2}" />
	</div>
	<div class="form-field">
	  <label class="cm-required" for="template_data[matwidth]">Material Width:</label>	  
	  <input type="text" name="template_data[matwidth]" id="template_data[matwidth]" value="{$templateDetails.matwidth}" />
	</div>
	<div class="form-field">
	  <label class="cm-required" for="template_data[use]">Use:</label>	  
	  <input type="text" name="template_data[use]" id="template_data[use]" value="{$templateDetails.use}" />
	</div>
	<div class="form-field">
	  <label class="cm-required" for="template_data[file]">File:</label>	  
	  {include file="common_templates/fileuploader.tpl" var_name="template_data[file]"}
	</div>
  </fieldset>

  <div class="buttons-container">
	{if !$templateDetails|fn_allow_save_object:"template" && $mode != "add"}
	  {assign var="hide_first_button" value=true}
	{/if}
	{include file="buttons/save_cancel.tpl" but_name="dispatch[tv_documentmanager.manage_documents]" cancel_action="close" hide_first_button=$hide_first_button}
  </div>
</form>
</div>

CSCart File Uploader

27 June 2012 - 04:44 PM

Hey I'm working on a document management add-on for cs-cart and I am running into some issues with the native file uploader (comment_templates/fileuploader.tpl). For some reason, when I select a local file from the list, it only gets selected/uploaded half the time. I noticed if I open an edit window (in my addon), close it, open an add window (also in addon), and close it, then go back to add/edit and it will work fine.

Here is an example of the empty(ish) array:

array (size=1)
'file_template_data' =>
array (size=5)
'name' =>
array (size=1)
'file' => string '' (length=0)
'type' =>
array (size=1)
'file' => string '' (length=0)
'tmp_name' =>
array (size=1)
'file' => string '' (length=0)
'error' =>
array (size=1)
'file' => int 4
'size' =>
array (size=1)
'file' => int 0


Most of the time my $_FILES array will have a few empty fields in it, unless I do the open/close thing, in which case the $_FILES array would display correctly.

My include call is pretty straight forward, I don't know if I am missing anything.

{include file="common_templates/fileuploader.tpl" var_name="template_data[file]"}

Also, can somebody explains what happens when a file is uploaded via the server link (instead of the local or url links). The file shows up in the list of files to be uploaded in the fileuploader.tpl, but once I hit submit I get another empty $_FILES array. Is that info stored somewhere else since it is already on the server?

Location for global classes?

12 June 2012 - 06:21 PM

We are utilizing some web services from multiple addons that all require the same classes to be defined. Is there a location to store class files that can be called upon from multiple addons?

Is it possible to create an addon that houses global functions and classes that can be included/called from other addons?

Lastly, if I place my classes into /core/classes would they disappear when an update is released? I'm not sure if the folder is wiped and replaced or if any non-native files would remain untouched?