X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Problem with buy now / add to cart buttons (https://forum.x-cart.com/showthread.php?t=43682)

aferg 11-14-2008 09:16 PM

Problem with buy now / add to cart buttons
 
Hi,

I have enabled buy now / add to wishlist on the product list pages which include recommended products areas too.

Please visit http://www.littlebitgreen.com/home.php to view (hopefully launching this coming week).

The buttons don't seem to trigger any action. The buttons do work when you are in the product details page. Is this a javascript problem?

Here is an example of the buttons from the homepage that do not work:
Code:


<form method="post" action="cart.php?mode=add">
<div>
<input type="hidden" name="productid" value="16356" />
<input type="hidden" name="cat" value="" />
<input type="hidden" name="page" value="" />
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
 <td width="20%" class="BuyNowQuantity">Quantity</td>
 <td>
<select name="amount">
 <option value="1">1</option>
 <option value="2">2</option>
</select>
 </td>
</tr>
<tr>
 <td class="BuyNowPrices" colspan="2">
<input type="hidden" name="mode" value="add" />
 </td>
</tr>
<tr>
 <td colspan="2">
<table cellpadding="0" cellspacing="0">
<tr>
 <td><a class="button" href="javascript: document.orderform_16356_1226352918.submit(); return false;" onclick="javascript: document.orderform_16356_1226352918.submit(); return false;;this.blur();return false;" ><span>Buy Now</span></a>
</td>
 <td style="padding-left: 20px;">
              <a class="button" href="javascript:document.orderform_16356_1226352918.mode.value='add2wl'; document.orderform_16356_1226352918.submit()" onclick="javascript:document.orderform_16356_1226352918.mode.value='add2wl'; document.orderform_16356_1226352918.submit();this.blur();return false;" ><span>Add to wish list</span></a>
 </td>
</tr>
</table>
 </td>
</tr>
</table>
</div>
</form>


Any thoughts or solutions?

Thanks
AF

p.s. sorry for the double post in another section but I did not receive any responses.

JWait 11-15-2008 06:44 AM

Re: Problem with buy now / add to cart buttons
 
By any chance did you implement the "Easy 2 image css button.tpl replacement" modification - http://forum.x-cart.com/showthread.php?t=39357 ? It appears to have "issues".

aferg 11-15-2008 08:19 AM

Re: Problem with buy now / add to cart buttons
 
No I did not but I am using a few mods from xcartmods.co.uk which include:
X-Cart CSS Template v4.1.11 Gold
X-Cart 3 Level Advanced Dynamic Category Menu
X-Cart Ultimate Speedbar Menu v4.x

I tried contacting Phil on this issue but received no reply.

JWait 11-15-2008 10:11 AM

Re: Problem with buy now / add to cart buttons
 
It is probably best to wait and see what Phil has to say about this.

One thing I did notice visiting your site (using Firefox) is that your "buttons" are not buttons at all. What I saw was similar to the images connected with the mod at http://forum.x-cart.com/showthread.php?t=39357 where it appears as a "button and a quarter" (a full button in a light color with a left end of a button in a darker color), which made me wonder if you had that mod done.

crazyoval 11-15-2008 06:41 PM

Re: Problem with buy now / add to cart buttons
 
Hi, I appreciate you are not asking for general feedback but I couldnt help noticing that your domain name was different to your site name... I think this is confusing. Lovely artwork though.

cbostard 11-17-2008 05:32 AM

Re: Problem with buy now / add to cart buttons
 
I know you probly want the layout same as it is now but try going to admin/apperance options/displaying products and select change display products list in a single column, to 1 , but it looks that it is a java script problem

PhilJ 11-17-2008 06:23 AM

Re: Problem with buy now / add to cart buttons
 
In skin1/customer/main/buy_now.tpl

Add...

Code:

name="orderform_{$product.productid}_{$product.add_date}"

To the <form> tag... then the buttons will function.

eg.
Code:

<form name="orderform_{$product.productid}_{$product.add_date}" method="post" action="{if $product.is_product_options eq 'Y' && !$buynow_enabled}product.php?productid={$product.productid}{else}cart.php?mode=add{/if}">

As for the button styling, you've changed the doctype to transitional, which might affect the appearance. I think more urgent, is the layout doesn't look correct in IE6.

aferg 11-19-2008 09:18 PM

Re: Problem with buy now / add to cart buttons
 
yep in IE6 I think the png fix is having an issue. I can see the site load properly when I have cleared the cache and the page loads from scratch and then it bounces into an ugly mess. I think this is when the png fix is applied.

update: ouch! turned off the png fix but it still is very nasty...I will look into the doc type.

update: I just realized I didn't include my ie6 styles so it is look much better. The png fix still cause issues though so I turned it off for now and of course now the png rendering problem is present.

Madhatterr 11-20-2008 06:54 AM

Re: Problem with buy now / add to cart buttons
 
Quote:

Originally Posted by PhilJ
In skin1/customer/main/buy_now.tpl

Add...

Code:

name="orderform_{$product.productid}_{$product.add_date}"

To the <form> tag... then the buttons will function.

eg.
Code:

<form name="orderform_{$product.productid}_{$product.add_date}" method="post" action="{if $product.is_product_options eq 'Y' && !$buynow_enabled}product.php?productid={$product.productid}{else}cart.php?mode=add{/if}">

As for the button styling, you've changed the doctype to transitional, which might affect the appearance. I think more urgent, is the layout doesn't look correct in IE6.


Well,

Out of no where it seems our buy it now button isn't doing anything either. I found this post and checked to see if we had the code you suggested and ... we do. So, I guess my question is, do you have any other suggestions on what I might check to see if it's not right? :(

Thanks in advance for your help!

aferg 11-20-2008 07:31 AM

Re: Problem with buy now / add to cart buttons
 
Hi Phil,

The buy now button works now(help much appreciated) but I am still having problems with the Add to Wishlist. When not signed in the button should take you to the register page(from what I remember).

However now it takes you to a page basic html page that says: Sorry, the shop is inaccessible temporarily. Please try again later.

That address of the page is also:http://www.littlebitgreen.com/error_message.php?need_login

Any ideas?

Thanks
AF


All times are GMT -8. The time now is 02:01 PM.

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