Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2012
    Posts
    1
    Plugin Contributions
    0

    Default Combining two modules?

    Good Afternoon Peeps,

    I'm in the process of building my first Zen Cart store and so far so good, nice bit of kit!

    I'm doing a bit of customisation and in need of help as unfortunately I am not a hardcore coder and this goes straight over my head.

    My shop will serve our regular account customers whom receive various discounts depending on how much we like them and whom also pay on invoice. We also have general public punters who receive no discount and pay via card and also non account trade customers who do receive discount but must also pay via card.

    Now the Invoice add on module satisfies the above as I can create a group discount with a prefixed name of "Invoice" and any of my customers who I assign to an invoice discount gets the invoice option at the checkout, all works beautifully.

    URL to Invoice add-on below
    http://www.zen-cart.com/index.php?ma...roducts_id=230

    The second thing I would like to do is have my discounted customers to be able to see "their" discounted price on the product page (not just at the checkout)

    This is sorted by the Group Pricing (per item) add-on if I create a group discount called Group A/Group B/Group C or Group D.

    Link below
    http://www.zen-cart.com/index.php?ma...roducts_id=256

    What I am looking to do is to merge the necessary files of two add-on modules so my discount customers see their prices when they log in as well as (if they are invoice customers) having the invoice button available on the checkout.

    At present I can only have one or the other as I don't know how to go about merging the two or even if it's possible.

    What I am looking to achieve is...

    Is it possible to have:-

    Group discount name:- "Invoice Group A" to D which will give a discount AND show discounted prices AND allow invoice payment on the checkout.

    as well as

    Group discount name:- "Group A" to D which will give a discount AND show discounted prices BUT will not show the invoice button on the payment page of the checkout.

    Any other group discount name will just be for ad hoc discounts with no special black magic apart from what is standard with Zen.


    I'm hoping some of you uber brainy people can help me out.


    Big thanks in advance!
    Dan

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    21,984
    Plugin Contributions
    25

    Default Re: Combining two modules into one SUPER module!

    What are the files that the two mods share? As I'm sure you know, those are the ones that will have to be merged. The first step would be to document exactly how each mod's version of those files differs from the stock version. Compare the difference areas and see how much overlap there is. Where they modify different parts of the stock files, you may be able to just use the respective mod version of the lines. If they both modify the same statement in different ways, you will need experienced PHP coders to advise on combining the functionality.

  3. #3
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    4,753
    Plugin Contributions
    48

    Default Re: Combining two modules into one SUPER module!

    There are no files to be merged - the two mods use different files.

    The invoice module just does a small check in includes/modules/payment/invoice.php to see if the person is in a group which starts with the string "invoice_".

    This check is done here:

    Code:
              $invoice_prefix = "invoice";
              $check_prefix = substr($check->fields['group_name'], 0, strlen($invoice_prefix));
              if (strcasecmp($check_prefix, $invoice_prefix) == 0) {
                $check_flag_group = true;
              }
    If both of your groups A-D have the same prices (whether or not they are invoice eligible), you should use another mechanism to identify invoice eligible customers. You'll have to hire someone to add an "invoice eligible" flag to your customers table and admin->customers->customers, but it will save you time because you'll only have to enter 4 prices instead of 8.
    That Software Guy, Plugin Moderator. Store: http://www.thatsoftwareguy.com/store/
    Contributions: Quantity Discounts, Better Together, SMS on Sale, Gift Wrap at Checkout, and more.

 

 

Similar Threads

  1. Combining Attributes
    By michaelg in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 10 Dec 2011, 03:02 PM
  2. Combining Stylesheets
    By autoace in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 11 May 2011, 02:28 AM
  3. Combining CSS
    By NBordeau in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 7 Jun 2010, 05:35 AM
  4. Combining Stylesheets
    By fsicody in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 25 Aug 2009, 05:17 PM
  5. Combining Stylesheets
    By neighbornick in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 23 Mar 2009, 07:30 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
  •