[Solved] Empty Cart while Zip Download

juergen.s

Joined: 2007-05-14
Posts: 9
Posted: Mon, 2009-04-06 20:59

On some systems zip can't access the /tmp folder, where zip stores its data.
If you want to download the zip, it just says "empty cart" and nothing happens.

You can change the tmp path manually to go around this problem.

modules/zipcart/classes/zipcartplugin.class
line 58: $zipBase = $platform->tempnam('/your/path/to/accessable/tmp/', 'zip_');

modules/zipcart/download.inc
line: 46 $file = '/your/path/to/accessable/tmp/' . basename($file) . '.zip';

modules/zipcart/zipcartadmin.inc
line 57: $zipBase = $platform->tempnam('/your/path/to/accessable/tmp/', 'zip_');

Furthermore I wanted to remove the "Add to Cart" from both actionmenus, and just display it on albumpages as icon in the upper left corner.

for menu beyond the items:
modules/core/templates/blocks/itemlinks.tpl
{foreach from=$links item="link"}
	{if $link.moduleId != "cart"}   < add this
	<option value="{if isset($link.script)}{$link.script}{else}window.location = '{g->url params=$link.params|default:null options=$link.options|default:null}'{/if}"{if !empty($link.selected)} selected="selected"{/if}>
	    {if $lowercase}
	      {$link.text|lower}
	    {else}
	      {$link.text}
	    {/if}
	  </option>
	  {/if}                                                  < add this
	{/foreach}


for menu in the upper left:
{foreach from=$links item="link"}
	  {if $link.moduleId != "cart"}                          < add this
		<a class="gbAdminLink {g->linkid urlParams=$link.params|default:null}" href="{g->url params=$link.params|default:null options=$link.options|default:null}"{if isset($link.script)} onclick="{$link.script}"{/if}{if isset($link.attrs)} {$link.attrs}{/if}>{if $lowercase}{$link.text|lower}{else}{$link.text}{/if}</a>
      {/if}                                                      < add this
	  {/foreach}

At the end i wanted the "download zip" entry as default in the cart instead of "cart actions"

modules/cart/templates/viewcart.tpl
      {foreach from=$ViewCart.plugins key=pluginId item=pluginData}
      <option label="{$pluginData.actionDisplayName}"
       value="{$pluginId}" selected="selected"> {$pluginData.actionDisplayName} </option>
      {/foreach}

//selected="selected"  has to be added.

And a more userfriendly message instead of "empty cart":

modules/cart/templates/viewcart.tpl
{if empty($ViewCart.items)}
<div class="gbBlock"><strong>
  <p> {g->text text="Your Download should start shortly."} </p>
  

I just pasted these infos for the people who needs some help there.

greets
hacki