X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Advanced Cart Mod (https://forum.x-cart.com/showthread.php?t=30809)

a1deano 09-21-2007 09:46 AM

Re: Advanced Cart Mod
 
Wow i love this much more pleasing to the eye and the customer can tell at a glance what theyv'e already added to their cart, i made a few changes to suit my needs.
Made the picture quite small also got rid of the delete and title of the item so i could keep the box size in line with my other boxes.

If anyone is looking for a smaller look here's my finished code, hope i done every think right but it works great.

Also added a pic for you to see, Sorry my image isn't very sharp or clear but it shows whats been changed

Quote:

{* $Id: minicart.tpl,v 1.12 2004/07/06 14:00:12 svowl Exp $ *}
<TABLE border="0" cellpadding="1" cellspacing="0">
<TR>
<TD rowspan="0" width="23">
{if $minicart_total_items > 0}<img border="0" src="{$ImagesDir}/cart_full.gif" width="19" height="16">
{else}<img border="0" src="{$ImagesDir}/cart_empty.gif" width="19" height="16">{/if}
</TD>
<TD class="VertMenuItems">{if $minicart_total_items > 0}{$lng.lbl_items}: </TD>
<TD class="VertMenuItems" color="#0000ff">{$minicart_total_items}{else}<CENT ER>{$lng.lbl_cart_is_empty}</CENTER>{/if}</TD>
</TR>
</TABLE>
{if $minicart_total_items > 0}
<table align="center" width="100" border="0" cellpadding="2">
<tr>
<td align="center" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px"><b>Pic</b></td>
<td align="center" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px"><b>Qty</b></td>
<td align="center" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px"><b>Price</b></td>
</tr>
<tr>
{foreach from=$minicart_contents item=item}
<td align="center">{if $item.is_pimage eq 'W' }{assign var="imageid" value=$item.variantid}{else}{assign var="imageid" value=$item.productid}{/if}
{include file="product_thumbnail.tpl" productid=$imageid image_x=32 product=$item.product tmbn_url=$item.pimage_url type=$item.is_pimage}
</td>

<td align="center">{$item.amount}
</td>
<td align="center">{$item.display_subtotal}</td>

<td align="center">
{if $config.Adaptives.platform eq 'MacPPC' && $config.Adaptives.browser eq 'NN'}
{assign var="js_to_href" value="Y"}
{/if}
{if $type eq 'input'}
{assign var="img_type" value='input type="image" class="blank"'}
{else}
{assign var="img_type" value='IMG'}
{/if}
{assign var="js_link" value=$href|regex_replace:"/^\s*javascript\s*:/Si":""}
{if $js_link eq $href}
{assign var="js_link" value="javascript: self.location='cart.php?mode=delete&productindex=` $item.cartid`'"}
{else}
{assign var="js_link" value=$href}
{if $js_to_href ne 'Y'}
{assign var="onclick" value=$href}
{assign var="href" value="javascript: void(0);"}
{/if}
{/if}
{if ($config.Adaptives.platform ne 'MacPPC' || $config.Adaptives.browser ne 'NN')}
{else}
<A href="cart.php?mode=delete&productindex=`$item.car tid`"{if $onclick ne ''} onclick="{$onclick}"{/if}{if $title ne ''} title="{$title}"{/if}{if $target ne ''} target="{$target}"{/if}><FONT class="FormButton">{$button_title} </FONT></A>
{/if}</td></tr>{/foreach}
</table>
{/if}
<HR size="1" NOSHADE class="VertMenuHr">
{if $minicart_total_items > 0}
<table width="100%" border="0" cellpadding="1" cellspacing="0">
<tr>
<TD class="MiniCartTextSmall"><a title="{$minicart_delivery}">Shipping Cost:</a></td><td align="right" class="MiniCartTextSmall">
<a title="{$minicart_delivery}">{include file="currency.tpl" value=$minicart_shipping}</a></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="1" cellspacing="0">
<tr>
<TD class="MiniCartTextSmall"><strong>{$lng.lbl_total} </strong>: </td>
<td align="right" class="MiniCartTextSmall"><strong>{include file="currency.tpl" value=$minicart_total_cost}</strong></td>
</tr>
</table>
{else}{/if}


Thank you for you hard work on this, cheers Dean

a1deano 10-03-2007 01:13 PM

Re: Advanced Cart Mod
 
Hi can anyone help with these 2 things please, i thought i had it all done untill i was checking a few things.

1st one is if i offer a discount the price shows correct with discount taken away but the "total"
price doesn't reflect the discounted price.

The 2nd one the shipping price isn't showing up unless i first view cart then go back to the item, then the shipping price is then showing but its not included in the over all total price.

As anyone managed to work these 2 things out, would really apprciate any help with these please.

Many thanks Dean

weckie 11-14-2007 10:57 AM

Re: Advanced Cart Mod
 
I used the code but in the minicart it says shipping cost are 0.00. After i go to the shopping cart and back to minicart the shippig cost are displayed.

Does anyone know what i am doing wrong???

regards Weckie

a1deano 03-09-2009 01:06 PM

Re: Advanced Cart Mod
 
Does anyone now if this mod will work on v4.2

Thanks

dwpers 08-13-2009 08:29 AM

Re: Advanced Cart Mod
 
+1

I have the same question as a1deano - I also can't find mini-cart.tpl, it doesn't seem to exist in my 4.2.2 install...

:-?

lash 11-05-2009 05:59 AM

Re: Advanced Cart Mod
 
Anyone uses this in 4.1? Anyone interested in showing what it looks like? Send a PM if you don't want to post your site.

MythNReality 11-05-2009 07:33 PM

Re: Advanced Cart Mod
 
I have this mod implemented on my 4.1x version
It works fine, except the shipping cost...let me know if you would like to see the working version.

lash 11-05-2009 11:19 PM

Re: Advanced Cart Mod
 
Quote:

Originally Posted by MythNReality
I have this mod implemented on my 4.1x version
It works fine, except the shipping cost...let me know if you would like to see the working version.


Yes I would be interested in having a look at working version. You don't have the special offer mod? One concern of mine is that the customer would have to go to the "big cart" to check out offers...

kgoel 07-17-2010 08:59 PM

Re: Advanced Cart Mod
 
I was trying to use your great mod. I have doen everything as per your guidelines but my minicart did not change at all. Instead it started giveing me an error

Warning: Smarty error: unable to read resource: "customer/meta.tpl" in/data/19/1/49/29/1864518/user/2025068/htdocs/retail/include/lib/smarty/Smarty.class.php on line 1093

I have switched back the original code but this error stays there at the top of browser. Whole cart is working fine as previously.

Any suggestions

a1deano 07-24-2010 11:06 AM

Re: Advanced Cart Mod
 
Could this be used on v4.4??


All times are GMT -8. The time now is 08:35 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.