AbanteCart Development > Customization help

Get rid of annoying "s in Add to Cart button on embedded site

(1/2) > >>

I have just installed AbanteCart on my already existing website as a back-end solution, replacing my old cart software. I have nearly everything the way I want it except two things. One of them is the [Qty:] and [Add to Cart] buttons have quotes in them, so they appear on the page as ["Qty:"] ["Add to Cart"]. After poking through the code for a few hours I figured out this annoying misuse of quotes is not a mistake but an artifact of the way that the variables are pulled from an XML file and then through several other subroutines. I've found that this exact same problem was in several other places in the same file, and in those places you used a function to strip the quotes out of the string, just not these. However the problem exists in a core file, which warns if edited will be overwritten when you update the cart to a new version, so I can't just fix it myself simply.

I would post exactly which files have the problem, and exactly where in the code the problem comes from so that you could fix this in 5 minutes, except that your forums have this rule that new accounts can't post URLs or code until we have sufficient karma. I could go make another thread and post some tips I've figured on how to customize AbanteCart to earn karma... but I can't do that because I can't post URLs or code. Who makes a forum to discuss software and bans new people from posting URLs and code??

The main piece of code is in the file js_product in the embed folder in the template folder in the default folder in the view folder in the store front folder.

The code in question echos the button text into some html which will be inserted into the page.

It pulls that text from the previous file, js, which is in the embed folder in the responses folder in the controller folder in the storefront folder.

That code sets the text to be the add to cart text which is gotten from the language storage of those variables. Elsewhere in that file there are subroutines which decode the string and strip out quotes. If you copied that code and applied it to this text before passing it on, the problem would be solved.

I would appreciate if you could take a few minutes to strip those quotes out for us. It makes our website look like it was written by idiots who don't know how to use quotes, when it's actually just a parsing error.

Language definitions like Add to Cart is without any quotes
Can you share a link where you embed products?

I cannot directly share a link, because the forums don't let new accounts do that. Below is a test page which has buttons on it.

calsci dot com slash motorcycleinfo slash test dot html

You can see the annoying quotation marks on that page.

Thank you. Now I see what are you talking about.
You need to change this file

--- Quote ---js_echo($text_qty);
--- End quote ---

--- Quote ---echo $text_qty;
--- End quote ---

That fixed it, thank you.


[0] Message Index

[#] Next page

Go to full version
Powered by SMFPacks Social Login Mod