Announcement

Collapse
No announcement yet.

Paypal Excluded Products

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Paypal Excluded Products

    Hi all,

    Sorry but I can't find anything relating to this when I search the forum. Delighted if anyone can point me somewhere.

    Due to UK law, PayPal has determined that some products are now no longer able to be paid for through their system. It looks like that 'exclusion zone' may widen. My sphere is affected due to gun laws by the look of it so there are some specific items I need to exclude from Paypal in the sellerdeck checkout pages.

    SellerDeck have informed me that this is something they can't help me with. I think they are too busy.

    So, I'm looking for assistance from someone who can either advise me or do some code work for me. I don't think it's anything fancy, I just need something like a checkbox to appear for every product which will allow me to 'check it' if I want to exclude it from the PayPal payment option in the SellerDeck checkout pages.

    If I check the box it I need the PayPal option to be removed from the Sellerdeck checkout screen (that will of course mean the entire order rather than just the specific product otherwise I understand that it would be overly complicated). Maybe a pop up explaining to the customer in the checkout system?

    If anyone can help or they have already worked on something similar I would be very interested to hear from you.

    Thanks very much,

    #2
    This isn't that easy a thing to do as you'll need to:

    1. Create a variable to hold your 'paypal excluded' value.

    2. On the checkout page you'll need to parse all the products in the cart to see if any have the 'paypal excluded' variable set.

    3. If they do then you'll need to hide the usual payment option box and display an alternative without paypal.

    I haven't done this so you'll need to work out the details yourself or someone else might chip in and help out.

    Mike

    PS. If you aren't already using product weights then this might be a useful proxy variable for 'exclude from paypal' as there'll be total weight value available for the cart contents.
    -----------------------------------------

    First Tackle - Fly Fishing and Game Angling

    -----------------------------------------

    Comment


      #3
      If you are able to add a few unique characters to these excluded product names (or Product References if you display these in the Cart) then you could probably add some JavaScript to the payment select page that searches the page for such characters and, if found, removes the PayPal option from the list of payments.

      Using a Variable will require you patching ActinicOrder.pm as well as creating some similar JavaScript and that's a lot trickier that a JS only solution. You'd also have to re-patch ActinicOrder.pm if you update SD to a new release.
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        Thank you for the input gentleman, much appreciated.

        Comment


          #5
          Here's some working code (at least on demo site):
          Edit layout cart Product Details With Thumbnails and look for the line:
          Code:
          <Actinic:Variable Name="ProductNameOnline"/>
          Replace it with:
          Code:
          <span class="prodnameincart"><Actinic:Variable Name="ProductNameOnline"/></span>
          Edit layout Payment Method Selection and add the following at the bottom:
          Code:
          <script type="text/javascript">
          var spans = document.getElementsByTagName('span');
          for (var i=0; i<spans.length; i++)
          	{
          	if (spans[i].className == 'prodnameincart')
          		{
          		if (spans[i].innerHTML.indexOf('NoPP') > -1)
          			{
          			document.getElementById('idPAYMENTMETHOD').remove(0);
          			break;
          			}
          		}	
          	}
          </script>
          This will remove the first payment method if any product in the cart has NoPP in it. Amend the NoPP above to alter for a different trigger string.

          To amend for the second payment method, change the 0 in remove(0); above to a 1, 2 for the 3rd, etc..
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            Thank you Norman for all your help, I couldn't have resolved my issues without you.

            Thank you too for the cool 'plug ins'!

            Comment

            Working...
            X