Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

mod template issue

 
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4
 
Thread Tools
  #1  
Old 12-22-2008, 06:57 AM
 
keystone keystone is offline
 

X-Adept
  
Join Date: Jul 2006
Location: USA
Posts: 787
 

Default mod template issue

I purchased a mod from bcse called Easy Variant View. This template is in the skin/customer/main file. What it does is take my variants for a specific product and put them into a table with the image, description, and price so they can all be viewed easily instead of the dropdown window. The other thing it does is allow multiple variants to be purchased with one click. Here is a link to what it looks like

http://www.bcsengineering.com/store/popup_image.php?type=D&id=284&title=Easy%20Variant %20View%20for%20X-cart&area=C

I am having 2 issues that I hope someone can help me out with before I can make this a live mod.

#1: The "go" button next to each variant does not allow for one variant to be added to the cart if that is all that is needed. I am sent back to the homepage with nothing added to the cart. (I know that href="#" does that but not sure why nothing is added to the cart) The customer will have to scroll all the way to the bottom of the table and click the "add to cart" button. The bit of code for the "go" buttons is this:

<a href="#" onclick="document.orderform.bcse_evv_add_multiple. value=''; document.orderform.bcse_evv_add_one.value='{$vntid }'; document.orderform.submit()">
{include file="buttons/go.tpl" style="button"}

#2. I use quantity price breaks for some items for retail and many items for wholesale members. The quantity/price table is not showing up for the variants. I tried adding the {include file="customer/main/product_prices.tpl} template but with no luck. I am assuming that there is some {foreach} {/foreach} code needed but am not sure how to do it.

Here is a copy of the whole template:

{literal}
<style type="text/css">
tr.bcse_evv_header {
background-color: #adf;
}
tr.bcse_evv_footer {
background-color: #adf;
}
td.bcse_evv_footer {
border-right: #036 1px solid;
border-bottom: #036 1px solid;
}
tr.bcse_evv_variant_row {
background-color: #fafaff;
}
table.bcse_evv {
border-left: #036 1px solid;
}
tr.bcse_evv_variant_row td.bcse_evv {
border-right: #036 1px solid;
border-bottom: #036 1px solid;
padding: 10px;
}
table.bcse_evv th {
border-right: #036 1px solid;
border-bottom: #036 1px solid;
border-top: #036 1px solid;
padding: 5px;
}
td.bcse_evv_classtext {
font-style: italic;
}
</style>
{/literal}

<table class="bcse_evv" width="100%" cellpadding="0" cellspacing="0">
<tr class="bcse_evv_header">
<th>&nbsp;</th>
<th>{$lng.lbl_bcse_evv_description|escape}</th>
{if $config.General.unlimited_products ne 'Y' and $config.Appearance.show_in_stock eq 'Y'}
<th>{$lng.lbl_bcse_evv_quantity|escape}</th>
{/if}
<th>{$lng.lbl_bcse_evv_price|escape}</th>
<th>{$lng.lbl_bcse_evv_buy|escape}</th>
</tr>

{foreach from=$variants key=vntid item=vnt}{*Loop through variants*}
<tr class="bcse_evv_variant_row">
<td class="bcse_evv" style="width:0">{strip}
{if $vnt.image_path_W}
{include file="product_thumbnail.tpl" productid=$vntid product=$product.product tmbn_url=$vnt.image_path_W id="product_thumbnail" type="W"}
{else}
{include file="product_thumbnail.tpl" productid=$vntid image_x=$product.image_x image_y=$product.image_y product=$product.product tmbn_url=$product.image_path_T id="product_thumbnail" type="W"}
{/if}
{/strip}</td>

<td class="bcse_evv">
<table width="100%">

{foreach from=$vnt.options item=vntopt}{*Loop through variant options*}
<tr>
<td nowrap="nowrap" class="bcse_evv_classtext" style="width:0">{$vntopt.classtext}:</td>
<td>
<b>{$vntopt.option_name}</b>
<input type="hidden" name="bcse_evv[{$vntid}][product_options][{$vntopt.classid}]" value="{$vntopt.optionid|escape}" />
</td>
</tr>
{/foreach}{*/variant options*}

{foreach from=$product_options item=prodclass}{*Loop through all product option classes*}

{*Check if option is already in variant*}
{assign var="in_vnt" value="N"}
{foreach from=$vnt.options item=vntopt}
{if $vntopt.classid eq $prodclass.classid}
{assign var="in_vnt" value="Y"}
{/if}
{/foreach}

{if $in_vnt eq 'N'}
<tr>
<td nowrap="nowrap" class="bcse_evv_classtext" style="width:0">{$prodclass.classtext}:</td>
<td>
{if $prodclass.is_modifier eq 'T'}
<input name="bcse_evv[{$vntid}][product_options][{$prodclass.classid}]" />
{elseif $prodclass.is_modifier eq 'Y'}
<select id="po{$prodclass.classid}" name="bcse_evv[{$vntid}][product_options][{$prodclass.classid}]"{if $disable} disabled="disabled"{/if}>
{foreach from=$prodclass.options item=prodopt}{*Loop through all product options (not in the variant)*}
<option value="{$prodopt.optionid}"{if $prodopt.selected eq 'Y'} selected="selected"{/if}>{$prodopt.option_name}{if $prodclass.is_modifier eq 'Y' && $prodopt.price_modifier ne 0} ({if $prodopt.modifier_type ne '%'}{include file="currency.tpl" value=$prodopt.price_modifier display_sign=1 plain_text_message=1}{else}{$prodopt.price_modifie r}%{/if}){/if}</option>
{/foreach}{*/product option classes*}
</select>
{/if}
</td>
</tr>
{/if}
{/foreach}{*/product options*}

<tr>
<td class="bcse_evv_classtext">{$lng.lbl_bcse_evv_sku| escape}:</td>
<td>{$vnt.productcode}</td>
</tr>
<tr>
<td class="bcse_evv_classtext">{$lng.lbl_bcse_evv_weig ht|escape}:</td>
<td>{$vnt.weight}</td>
</tr>

</table>

</td>

{if $config.General.unlimited_products ne 'Y' and $config.Appearance.show_in_stock eq 'Y'}
<td align="center" class="bcse_evv" style="width:0">{$vnt.avail}</td>
{/if}
<td align="center" class="bcse_evv" style="width:0">
<font class="ProductDetailsTitle"><span id="product_price" style="white-space: nowrap;">{include file="currency.tpl" value=$vnt.taxed_price plain_text_message=true}</span></font><br />
<font class="MarketPrice"><span id="product_alt_price" style="white-space: nowrap;">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$product.taxed_price plain_text_message=true}</span></font>
</td>
<td align="center" style="width:0" class="bcse_evv" nowrap="nowrap">
<input type="text" name="bcse_evv[{$vntid}][amount]" value="0" size="2" />
<a href="#" onclick="document.orderform.bcse_evv_add_multiple. value=''; document.orderform.bcse_evv_add_one.value='{$vntid }'; document.orderform.submit()">
{include file="buttons/go.tpl" style="button"}
</a>
</td>
</tr>

{/foreach}{*/variants*}

<tr class="bcse_evv_footer">
<td class="bcse_evv_footer" colspan="5" align="right">
<input type="hidden" name="bcse_evv_add_multiple" value="" />
<input type="hidden" name="bcse_evv_add_one" value="" />
<input type="hidden" name="productid" value="{$productid}" />
{include file="buttons/add_to_cart.tpl" style="button" href="javascript:document.orderform.bcse_evv_add_o ne.value=''; document.orderform.bcse_evv_add_multiple.value='ad d_multiple'; document.orderform.submit()"}
</td>
</table>


Any help or insight would be great.
Thanks
__________________
www.uscandleco.com - X-Cart Version 4.7.11 Gold Plus php7.3
mods:
reCaptcha
running on UNIX

www.keystonecandle.com X-Cart Gold Plus - Version 4.7.11 php7.2
mods:
reCaptcha
cdseo pro
running on UNIX
Reply With Quote
  #2  
Old 12-22-2008, 07:17 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: mod template issue

Moving to Third Party Add-Ons
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:22 AM.

   

 
X-Cart forums © 2001-2020