marty.net 1001 Postcards Love Love Love Meep Meep ZenZodiac DailyQuotation

YOU ARE HERE:
Customizing "Add to Cart Button" Woes

HOME

CPSHOP|

|

|

EMAIL MARTY
  marty.net message board
  « Customizing "Add to Cart Button" Woes »
Welcome, Guest. Please Login or Register.
12/14/17 at 08:23:29
Home Help Search Login Register
   marty.net message board
   About cpshop
   Customization Help
   Customizing "Add to Cart Button" Woes
(Moderator: Marty)
Pages: 1 Reply Notify of replies Send the topic Print 
   Author  Topic: Customizing "Add to Cart Button" Woes  (Read 1415 times)
jrotem
Gold Dragon
****

Posts: 135



Who are the Scots and where shoud they be going?
   

WWW
Customizing "Add to Cart Button" Woes
« on: 08/24/09 at 20:09:17 »
Reply with quote Modify message

I am having trouble getting a customized "add to cart" button to show up. I am using the following in the cgi.images file:

*||||<input type="submit" Value="Add to Cart"||||<input type="image" src="/addtocart3.png" name="submit"

I've checked the path, tried it several ways, and also tested customizing text in the file to make sure I didn't have any security issues with my cgi-bin.

Any ideas what else I should check?
Thanks!
Logged
jrotem
Gold Dragon
****

Posts: 135



Who are the Scots and where shoud they be going?
   

WWW
Re: Customizing "Add to Cart Button" Woes
« Reply #1 on: 09/07/09 at 19:00:43 »
Reply with quote Modify message

Anyone? Marty? Bueller? Purty please?
Logged
flippinsweetgear
Gold Dragon
****

Posts: 171



Go Scots!
   

WWW
Re: Customizing "Add to Cart Button" Woes
« Reply #2 on: 09/08/09 at 10:32:21 »
Reply with quote Modify message

Thats what I have, but I use an absolute URL to the image.  Try that?

 
Code:
*||||<input type="submit" Value="Add to Cart"||||<input type="image" src="http://yoursite/images/yourcartimage.gif" name="submit"
Logged

Flippin Sweet Gear | Kids T-shirts | Big Lebowski Shirts
jrotem
Gold Dragon
****

Posts: 135



Who are the Scots and where shoud they be going?
   

WWW
Re: Customizing "Add to Cart Button" Woes
« Reply #3 on: 09/18/09 at 13:34:43 »
Reply with quote Modify message

I only just saw the notification  for your reply! D'oh!  Thanks so much for your reply.  Anyway, yes, I have tried that and just did again. It's very odd, can't imagine why it wouldn't work.  
« Last Edit: 09/18/09 at 13:38:03 by jrotem » Logged
jrotem
Gold Dragon
****

Posts: 135



Who are the Scots and where shoud they be going?
   

WWW
Re: Customizing "Add to Cart Button" Woes
« Reply #4 on: 09/18/09 at 13:43:23 »
Reply with quote Modify message

Not that it should make much of a difference, but I am able to change text in the cgi.images, however (ie that bib description "ew, baby baby," which has always bugged me, lol.)
Logged
KaptainMyke.com
Gold Dragon
****

Gender: male
Posts: 210



KaptainMyke.com , Inc.
   

WWW E-Mail
Re: Customizing "Add to Cart Button" Woes
« Reply #5 on: 02/16/11 at 14:57:37 »
Reply with quote Modify message

mine's not working either.  what gives?
Logged

Mike "KaptainMyke" Sorensen
www.kaptainmyke.com
KaptainMyke.com, Inc.
CEO
jrotem
Gold Dragon
****

Posts: 135



Who are the Scots and where shoud they be going?
   

WWW
Re: Customizing "Add to Cart Button" Woes
« Reply #6 on: 02/21/11 at 22:53:44 »
Reply with quote Modify message

I wish I knew
Logged
brattytees
Gold Dragon
****

Posts: 439



ack!
   

Re: Customizing "Add to Cart Button" Woes
« Reply #7 on: 02/22/11 at 17:54:00 »
Reply with quote Modify message

I don't know if this is why it's not working, but cpshop is replacing CP's Add to Cart code with the


Code:
input type="submit" Value="Add to Cart"


bit that you're trying to replace.

I don't use the images file to change things, so I'm not up to speed on how it functions. Maybe you can't replace something that cpshop has already replaced? I don't know. I think Marty would have to answer that.

The original CP code that cpshop is replacing is ~


Code:
<input id="AddToCartButtonId" type="image" src="http://content3.cpcache.com/marketplace/img/btn_AddtoCart.gif" alt="Add to Cart" />


Edit - I guess I should add that is what it is for my circumstances, I have no idea if it is across the board as there are several different pieces of code CP uses for the Add to Cart button (a basic shop, a premium shop and the MP all have different versions of that), and of course the "content3" part could be a number other than "3" also. So I'm not sure if that helps you or makes it more confusing.
« Last Edit: 02/22/11 at 17:56:30 by brattytees » Logged
brattytees
Gold Dragon
****

Posts: 439



ack!
   

Re: Customizing "Add to Cart Button" Woes
« Reply #8 on: 02/22/11 at 18:02:46 »
Reply with quote Modify message

I don't advocate hacking the script, but if you want to feel brave you can go into cpshop cppage.lib and around line 1339 (2.7i) look for


Code:
$table =~ s|<input[^>]+type="image" src=".*?"|<input type="submit" value="Add to Cart"|i;


and put a hash mark # in front of that line to comment it out. Save and upload and then view the source of your product page in a browser to see what CP's code is, then you could try to substitute that via the images file.

Of course make a backup before you change anything and I am not responsible if your site crashes yada yada yada.
Logged
jrotem
Gold Dragon
****

Posts: 135



Who are the Scots and where shoud they be going?
   

WWW
Re: Customizing "Add to Cart Button" Woes
« Reply #9 on: 03/05/11 at 03:05:00 »
Reply with quote Modify message

Hmm.. my source does not even show a "AddToCartButtonId."

Onward to experiment some more ...
Logged
brattytees
Gold Dragon
****

Posts: 439



ack!
   

Re: Customizing "Add to Cart Button" Woes
« Reply #10 on: 03/05/11 at 14:42:54 »
Reply with quote Modify message


on 03/05/11 at 03:05:00, jrotem wrote:
Hmm.. my source does not even show a "AddToCartButtonId."


That is because cpshop has already replaced CP's html string of

<input id="AddToCartButtonId" type="image" src="blahblahblah" alt="Add to Cart" />

with

<input type="submit" Value="Add to Cart">

as I mentioned above, so you will not see it unless you comment the line of code I mentioned because it is no longer there in the page cpshop generates, cpshop has replaced it.

« Last Edit: 03/05/11 at 14:49:49 by brattytees » Logged
jrotem
Gold Dragon
****

Posts: 135



Who are the Scots and where shoud they be going?
   

WWW
Re: Customizing "Add to Cart Button" Woes
« Reply #11 on: 03/05/11 at 20:55:58 »
Reply with quote Modify message

thanks but no, didnt work for me.
Logged
brattytees
Gold Dragon
****

Posts: 439



ack!
   

Re: Customizing "Add to Cart Button" Woes
« Reply #12 on: 03/07/11 at 15:25:20 »
Reply with quote Modify message



on 03/05/11 at 20:55:58, jrotem wrote:
thanks but no, didnt work for me.

If you'd like to post what didn't work maybe we can figure it out.
Logged
Pages: 1 Reply Notify of replies Send the topic Print 
Jump to:


marty.net message board (http://www.marty.net/cgi/marty/board/messageboard)

Powered by YaBB 1 Gold - Release (Yet Another Bulletin Board)
Copyright 2000-2001, X-Null. All Rights Reserved.