Tearing my hair out here! I am working on a site for a client who makes and sells soaps that he has made. There are only eight or so different types and so we just went with the PayPal option as he has a merchant account with them. My problem is that when you click on the ‘add to cart’ button you get sent to the PayPal cart page OK but if you then continue shopping previous items appear and disappear from the cart as other soaps are added - it’s all very strange. The page concerned is at:
Is it because of the way I have set it up in Freeway (5.6.4) or because at the moment it is uploaded to a subdomain or something. I just cannot seem to get to the bottom of it!
I see from the code that you are using what are called hosted PayPal buttons that you have generated on the PayPal site. These are generally fine but I can’t see exactly what they are supposed to do just by looking at the code as the button functionality is encapsulated in the button ID over on the PayPal servers.
The benefit of using a hosted button like this is that you can be sure that no one has tinkered with the HTML code to try and get your products for a cut down price.
I would imagine, but can’t be sure, that each button is unaware of the others and is clearing the cart contents when a new product is added.
There are two possible solutions;
Have a look through the PayPal settings on the button builder you used on their site and see if you can rectify this issue or
Use the PayPal Actions that ship with your version of Freeway (Insert > Action Item… > PayPal Button) and select Add to Cart in the Button Type menu.
If you do go for option 1 then you may want to remove the target from the buttons as well so they don’t open in a new window. Personally I think it looks a bit odd.
Nice looking site btw.
Regards,
Tim.
On 20 Jun 2012, at 03:07, Kayjay wrote:
Is it because of the way I have set it up in Freeway (5.6.4) or because at the moment it is uploaded to a subdomain or something. I just cannot seem to get to the bottom of it!
It was the PayPal button codes in the end. Your comment about them not recognising each other seemed to ring true and so I deleted all previous buttons in PayPal, remade them and reinserted the code into the markup item and all works a treat now.
Also the PayPal button in Freeway only works as a stand alone html item as soon as you put it into a table or have it inline it does not work - in the actions palette it says “Cannot use this Action. It’s not possible to use this Action as an inflow item.” I have had to use Walt’s crowbar action and put code in there previously.
You mention about not having the PayPal cart opening in a new window by removing the target. In the button code there is a line which says:
What do I need to change to prevent the cart opening in a new window?
This is because when you create an inline object in Freeway (other than adding an inline DIV with Insert / HTML Item) Freeway will always wrap it with a P tag. The Action knows this and doesn’t let you create an invalid
sandwich. Crowbar takes care of this for you, as long as it is the only thing on the line (or is at the beginning or end of the line of text).
Walter
On Jun 20, 2012, at 8:09 AM, Kayjay wrote:
Also the PayPal button in Freeway only works as a stand alone html item as soon as you put it into a table or have it inline it does not work - in the actions palette it says “Cannot use this Action. It’s not possible to use this Action as an inflow item.” I have had to use Walt’s crowbar action and put code in there previously.
The target=“paypal” bit is the code that is opening a new window when the button is clicked. Technically the code tells the browser to open the resulting page in a target item called “paypal”. This could be a frame or a window but unless you’ve already defined one the browser will create a new window, call it “paypal” and open the resulting page in it.
Remove this from your markup and the cart should open in your main site window.
Regards,
Tim.
On 20 Jun 2012, at 13:09, Kayjay wrote:
You mention about not having the PayPal cart opening in a new window by removing the target. In the button code there is a line which says: