Page 1 of 1

CartMadeSimple no product in cart

Posted: Fri Mar 18, 2011 1:08 pm
by bob_basli
After installing the newest E-commerce modules of Duketowns' ShopMadeSimple 0.3.2
CartMadeSimple 0.3.5
PaymentMadeSimple 1.3
I discovered that when clicking the add to cart link, no product is added to the cart.
Am i doing something wrong in CMSMS1.9.4.1?

Regards,
Arjan

Re: CartMadeSimple no product in cart

Posted: Sat Mar 19, 2011 7:47 am
by Duketown
bob_basli,

Is there nothing that happens? Is the hyperlink 'Add to cart' used or is an image in place? Is pretty-url used?

Duketown

Re: CartMadeSimple no product in cart

Posted: Mon Mar 21, 2011 1:26 pm
by bob_basli
Duketown,

No use of pretty urls, using hyperkink, not an image.
Set the default template to fe_showcart and when clicking the add to cart link, the fe_showcart is shown with text No products in Cart, continue shopping. So apparently the product is not added unfortunately.

Can pm you url and admin user settings for trying and searhing.

Regards,
Arjan

Re: CartMadeSimple no product in cart

Posted: Mon Mar 21, 2011 1:45 pm
by Duketown
Ok, PM me and I'll look at it.
Have the idea that during insert in table something goes wrong.

Duketown

Re: CartMadeSimple no product in cart

Posted: Mon Mar 21, 2011 4:25 pm
by Duketown
Hi,

After some checking found out that products in the root category are not shown in the cart. Update will follow.
[edit]
For those that want a quick fix:
In program /library/orders.api.php on lines starting at 144 locate the following:

Code: Select all

			FROM ".cms_db_prefix()."module_cartms_carts cart 
			INNER JOIN ".cms_db_prefix()."module_sms_categories cat ON
			cart.category_id = cat.category_id 
			INNER JOIN ".cms_db_prefix()."module_sms_products prd ON
			cart.product_id = prd.product_id 
should be changed into:

Code: Select all

			FROM ".cms_db_prefix()."module_cartms_carts cart 
			LEFT OUTER JOIN ".cms_db_prefix()."module_sms_categories cat ON
			cart.category_id = cat.category_id 
			LEFT OUTER JOIN ".cms_db_prefix()."module_sms_products prd ON
			cart.product_id = prd.product_id 
Downside of this is that you will not have a root category description, nor a product description (if you have removed the product just after a visitor has added it to its cart (so best is to set the product to inactive))
[/edit]

Duketown

Re: CartMadeSimple no product in cart

Posted: Fri Apr 15, 2011 10:41 am
by map_1961
Hi Duketown.

I did so as you proposed im my 1.9.4.1 cms version after updating your sms solution files 2 the latest version but still there is no >>Add to cart<< link in the category view nor in the product view.
I use pretty url on my site.

What 2 do?

Thanks - map_1961

Re: CartMadeSimple no product in cart

Posted: Wed Apr 20, 2011 9:15 pm
by Duketown
map_1961,

Have you checked if there is a default template in CartMS turned on?

Duketown

Re: CartMadeSimple no product in cart

Posted: Thu Apr 21, 2011 2:37 am
by map_1961
Hi Duketown.

Thanks. The default template in CartMadeSimpe is fe_showcart and looks like this (no change since update):

Code: Select all

{* List of products in cart *}
{literal}
<__script__ language="JavaScript">

function UpdateQty(item)
{
	product_id = item.name;
	newQty = item.options[item.selectedIndex].text;
	<!-- I know, the following is not very neatly done, but it works. Sorry :-) // -->
	document.location.href = 'index.php?mact=CartMadeSimple,cntnt01,cart,0&cntnt01product_id='+product_id+'&cntnt01qty='+newQty+'&cntnt01perfaction=update_product';
}

</__script>
{/literal}<h4>
<div class="productlist">
{if $productcount != 0}
	<div ID="productcount">{$label_product_count}</div></h4>
{/if}
<table width="100%" border="0" cellspacing="10" cellpadding="20" bordercolor=#556677>
	{if $productcount > 0}
	<thead>
		<tr>
			<th>{$productqtytext}</th>
			<th>{$productnametext}</th>
			<th align="right">{$productpricetext}&nbsp;</th>
		  <th align="right">{$lineamounttext}&nbsp;</th>
		  <th class="pageicon">&nbsp;</th>
			<th class="pageicon"></th>
		</tr>
	</thead>
	<tbody>
		{foreach from=$products item=entry}
			<tr class="{$entry->rowclass}" onmouseover="this.className='{$entry->rowclass}hover';" onmouseout="this.className='{$entry->rowclass}';">
				<td class="productqty"><select name={$entry->product_id} onchange="UpdateQty(this);"> 
							{html_options options=$entry->qtydropdown selected=$entry->myqty}
							</select></td>
				<td class="productname">{$entry->name}&nbsp;&nbsp;&nbsp;</td>
				<td align="right" class="productprice">{$entry->price}&nbsp;</&nbsp;td>
				<td align="right" class="productamount">{$entry->lineamount}&nbsp;</td>
				<td align="right" class="productremove">{$entry->deletelink}</td>
			</tr>
		{/foreach}
	{else}
		<tr class="{cycle values="row1,row2"}">
			<td colspan='5' align='center'>{$noproductsincart}</td>
		</tr>
	</tbody>
	{/if}
</table>
{if $productcount > 0}<br>
	<div ID="totalamount"><b>{$label_total_amount}</b></div><br>
	<div ID="checkout">{$startcheckout}&raquo;</div><br>
{/if}
<div ID="continue">{$continueshopping}&raquo;</div>
</div>
<br /><br /><a href="javascript:history.back();"><span style="text-decoration: underline;"><strong><< zurück</strong></span></a></p><hr size="2" />
Thankx 4 checking this.

Cheers
map_1961

Re: CartMadeSimple no product in cart

Posted: Thu Apr 21, 2011 5:29 pm
by Duketown
map_1961,

Please make a small change to one of the products. The change is as follows:
Per product it is possible in Shop Made Simple (as of version 0.3.2) to control the inventory stock. At the moment that this stock level (the quantity in stock) has reached 0 (zero), there is no product anymore to sell. Hence the Add to cart is not shown anymore. Change the quantity on stock from 0 to for example 1000 and you will see the add to cart again.
Although there is a preference in Shop Made Simple that controls what type of inventory you have (either per product or per attribute), the function No used (read not used) is not working as I had in mind. I will change that in the next version.

Duketown

Re: CartMadeSimple no product in cart

Posted: Thu Apr 21, 2011 6:37 pm
by map_1961
Hi Duketown.

Thank you for the fast reply. As i see there are lots of new features in the sms modules!
But i am sorry not to find a quantity field in the product details of sms. I made a screenshot: http://www.mp-p.com/download/sms_0_3_2_ ... etails.jpg

Do i look at the wrong tab or whats wrong???
Shouöd i deinstall sms? But the next peoblem is, that in module tab there is no deinstall or upgrade link shown next to sms, cms & pms...

Sorry to make that much noise...

map_1961

Re: CartMadeSimple no product in cart

Posted: Sat Apr 23, 2011 4:59 am
by Duketown
map_1961,

In the preferences, in the bottom, locate 'Inventory to track'. Change this from 'No used' to 'Per Product'. Now you will see per product 'Quantity on stock'.

Duketown

Re: CartMadeSimple no product in cart

Posted: Sat Apr 23, 2011 7:33 am
by map_1961
...that works proper.
Many thanks & happy easter.

map_1961