Page 11 of 73 FirstFirst ... 9101112132161 ... LastLast
Results 101 to 110 of 730
  1. #101
    Join Date
    Sep 2008
    Posts
    605
    Plugin Contributions
    6

    Default Re: WorldPay Module version 2.0 - Support thread

    Just clarify, did you add something to one of the defines like PAYMENT_METHOD_DETAIL or something, to put the image in ?

  2. #102
    Join Date
    Oct 2007
    Location
    Australia
    Posts
    843
    Plugin Contributions
    0

    Default Re: WorldPay Module version 2.0 - Support thread

    That would help huh LOL

    I added the code into includes/languages/english/modules/payment/worldpay.php

    PHP Code:
     define('MODULE_PAYMENT_WORLDPAY_TEXT_TITLE''<img src="https://select.worldpay.com/jsp/shopper/pictures/poweredByWorldPay.gif" alt="WorldPay" /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Credit Card via WorldPay'); 
    HunnyBee Design
    "A man's manners are a mirror in which he shows his portrait." ~ Johann Wolfgang von Goethe

  3. #103
    Join Date
    Sep 2008
    Posts
    605
    Plugin Contributions
    6

    Default Re: WorldPay Module version 2.0 - Support thread

    I am buggered if I can find a cunning way of doing it, but the simple way if for you to edit

    /email/email_template_wp_callback.html

    there's all kinds of variables in there so after each one put (a) (b) (c) do a test order, look at the email to work out which variable was affected and then replace it. so if it is $PAYMENT_METHOD_DETAIL being replaced by your constant MODULE_PAYMENT_WORLDPAY_TEXT_TITLE then you just remove $PAYMENT_METHOD...

    The automatic emailing sytem in includes/classes/orders.php which would involve a lot of editing of code, when the easy way is just to replace the section in the email template with whatever you want.

    Philip.

  4. #104
    Join Date
    Oct 2007
    Location
    Australia
    Posts
    843
    Plugin Contributions
    0

    Default Re: WorldPay Module version 2.0 - Support thread

    I'm trying to understand that, but I'm a bit lost even contemplating it LOL

    The code in includes/modules/payment/worldpay.php that calls the define MODULE_PAYMENT_WORLDPAY_TEXT_TITLE is this section here on Line 54:

    Code:
          $this->title =  (IS_ADMIN_FLAG === true) ? MODULE_PAYMENT_WORLDPAY_TEXT_ADMIN_DESCRIPTION.' v'.$this->moduleVersion .( (MODULE_PAYMENT_WORLDPAY_TEST_MODE != 0) ? ' <b style="color:red">(Test Mode activated)</b>' : '') : MODULE_PAYMENT_WORLDPAY_TEXT_TITLE;
          $this->enabled = ((MODULE_PAYMENT_WORLDPAY_STATUS == 'True') ? true : false);
    I was wondering if I can add in an extra constant I create in the language file for the image, say MODULE_PAYMENT_WORLDPAY_IMG for example somewhere before MODULE_PAYMENT_WORLDPAY_TEXT_TITLE in that code? Is that possible?

    As you can see I am very very new to php and not overly sure what I am doing most of the time LOL
    HunnyBee Design
    "A man's manners are a mirror in which he shows his portrait." ~ Johann Wolfgang von Goethe

  5. #105
    Join Date
    Sep 2008
    Posts
    605
    Plugin Contributions
    6

    Default Re: WorldPay Module version 2.0 - Support thread

    Ok you are not bad in that you hae the right constant and location but you don't get the big picture. An entirely diffferent part of zencart after an order is successfully makred as paid, starts working on the tables, it pulls the constant through from the worldpay module and embeds it in the "order", in a single static row in a table that is saved for all time (that's hwo it's supposed to work). Now when it does this, it happens to pull the email template, does a quick search and replace and sends out the html, from the same information.

    So if you created a new constant then you would have two options, either a) start playing with the module to get it to send out the new constant only after the order was successful, or b) start playing with the core of zencart and telling it to ignore what it normally does and change the constant in the email.

    The third way is what I suggested, edit the template for the emails that goes out. The template is a basic seearch & replace with information from the core of zencart, so you can write "I'm a blue monkey" in there and it will go out just as you wrote it. Things in Capitals with a $ in in front of them get replaced by zencart so you need to locate the $VARIABLE that shows your image, and just put "Paid by Worldpay" in it's place, so just mark up each section of the email template with letters or numbers so that when you put a test order through, you can work out which bit to change. I'd do this but I don't have a worldpay account (yes I know that I run the module and it's just weird, but it's also true) and I haven't got a spare demo site set up (which takes a couple of hours) when it's faster that you send yourself an email.

    It's a worldpay only template so won't affect any other users or processes, so you find the file,

    /email/email_template_wp_callback.html

    mark it up with numbers so that you can locate which variable to replace, and remove the sentence "I'm a blue monkey" before going "live".

    Philip.

  6. #106
    Join Date
    Oct 2007
    Location
    Australia
    Posts
    843
    Plugin Contributions
    0

    Default Re: WorldPay Module version 2.0 - Support thread

    Ok, I think I am getting closer to understanding this LOL and I believe the variable that needs changing is $PAYMENT_METHOD_DETAIL, what I don't know...or understand...is where this variable is 'defined' or written to change it, I tried looking it up in the developer's toolkit and it can't find it lol, so I think I am not understanding how or where to change that variable.

    **edited in to add that I can find the variable without the $ in includes/classes/orders.php:

    Code:
        $html_msg['PAYMENT_METHOD_DETAIL'] = (is_object($GLOBALS[$_SESSION['payment']]) ? $GLOBALS[$payment_class]->title : PAYMENT_METHOD_GV );
    but I really don't wanna screw up the file by mucking around with what I don't know LOL

    BTW I read earlier in the thread how you'd applied for a test account with WP and I think they really should give you one considering how much work you've put into enabling their customers to increase their money for them lol
    Last edited by LissaE; 6 Feb 2009 at 02:32 AM.
    HunnyBee Design
    "A man's manners are a mirror in which he shows his portrait." ~ Johann Wolfgang von Goethe

  7. #107
    Join Date
    Oct 2007
    Location
    Australia
    Posts
    843
    Plugin Contributions
    0

    Default Re: WorldPay Module version 2.0 - Support thread

    Mulling over this....lol

    Would the correct way to change this be to in includes/classes/orders.php add the following in red below:

    Code:
        $html_msg['PAYMENT_METHOD_DETAIL'] = (is_object($GLOBALS[$_SESSION['payment']]) ? $GLOBALS[$payment_class]->title : PAYMENT_METHOD_GV );
        $html_msg['PAYMENT_METHOD_DETAIL_WP']  = EMAIL_TEXT_PAYMENT_METHOD_DETAIL_WP;
    Then in includes/languages/english/wp_callback.php add the follwing define:

    Code:
    define('EMAIL_TEXT_PAYMENT_METHOD_DETAIL_WP', 'Credit Card Via Worldpay');
    And then finally in email/email_template_wp_callback.html replace

    Code:
    $PAYMENT_METHOD_DETAIL
    with

    Code:
    $PAYMENT_METHOD_DETAIL_WP
    Am I on the right track? Or way out of my league? LOL
    HunnyBee Design
    "A man's manners are a mirror in which he shows his portrait." ~ Johann Wolfgang von Goethe

  8. #108
    Join Date
    Oct 2007
    Location
    Australia
    Posts
    843
    Plugin Contributions
    0

    Default Re: WorldPay Module version 2.0 - Support thread

    Oo I am making this harder on myself than it has to be aren't I? I have read and re-read your reply and you literally mean to replace $PAYMENT_METHOD_DETAIL in the email template with Credit Card Via Worldpay ?
    HunnyBee Design
    "A man's manners are a mirror in which he shows his portrait." ~ Johann Wolfgang von Goethe

  9. #109
    Join Date
    Sep 2008
    Posts
    605
    Plugin Contributions
    6

    Default Re: WorldPay Module version 2.0 - Support thread

    Spot on, just rip the variable out of the template and plonk in whatever you want. Keep it Simple not so stupid, as you've done very very well in searching around in the bowels of zen cart, It's probably and anglo-australian misunderstanding. Find the template, test it for the place you want your new thing and then replace the variable in the file, not elsewhere.

    As for worldpay, who really knows and understands their logic, they have a clearly published set of developer guidelines, but no testing mechanism unless you pay for a merchant account, and I only inherited this module when I broke it. There's supposed to be an affiliate reommend system too, and I haven't got that either, the only reason I know is that every so often somone comes along here and spams the forum. I rely on people trusting me enough to give me access to their merchant accounts just to run this and with ZC 2.0 around the corner, everything will stop working.

  10. #110
    Join Date
    Oct 2007
    Location
    Australia
    Posts
    843
    Plugin Contributions
    0

    Default Re: WorldPay Module version 2.0 - Support thread

    Well, you know we are an upside down backward lot down here LOL add in blonde DNA to the mix and there's bound to be trouble

    You ever need to test with a merchant account gimme a holler, I really don't make enough worth stealing at the moment ROFLMAO and I would trust you anyways ;)
    HunnyBee Design
    "A man's manners are a mirror in which he shows his portrait." ~ Johann Wolfgang von Goethe

 

 
Page 11 of 73 FirstFirst ... 9101112132161 ... LastLast

Similar Threads

  1. MultiSite Module Support Thread
    By Gerome in forum All Other Contributions/Addons
    Replies: 2215
    Last Post: 21 Sep 2022, 05:43 AM
  2. v154 WorldPay Module version 3.0 - Support thread
    By countrycharm in forum Addon Payment Modules
    Replies: 115
    Last Post: 20 Jul 2021, 04:00 PM
  3. v151 Codetrio Sphinx Search Version 1.0 Support Thread
    By imranulh in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 16 Jul 2014, 01:24 AM
  4. Simple SEO URL (OLD version) [support thread]
    By yellow1912 in forum All Other Contributions/Addons
    Replies: 5053
    Last Post: 30 Jun 2014, 02:42 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR