Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2005
    Location
    Charlottesville, VA
    Posts
    439
    Plugin Contributions
    0

    Default Custom product type with custom PRODUCT_PRICE_DISCOUNT_PREFIX

    Howdy.

    I have successfully created my Document-Register product type, and it's working.

    Here's an example, in my sandbox:
    http://www.coreknowledge.org/registe...roducts_id=137

    I'd like to have a custom Specials prefix.

    So far:
    includes/languages/english/[MY CUSTOM TPL DIR]/english.php

    (it seems overrides don't work for that file, so it really resides in includes/languages/english/english.php)
    Code:
      define('PRODUCT_PRICE_DISCOUNT_PREFIX','Save: ');
      define('DOCUMENT_REGISTER_PRICE_DISCOUNT_PREFIX','Early registration discount: ');
    But I am puzzled where to insert that. The only place I find PRODUCT_PRICE_DISCOUNT_PREFIX called is in includes/functions/functions_prices.php by the $show_sale_discount statements.

    I suppose I would insert a conditional clause in those, to test for product type, and depending on the test, use my custom discount prefix? Is there an elegant way to do this without mucking up the original functions_prices.php file?

    thanks in advance!

    ---Diana
    ---signature missing-in-action

  2. #2
    Join Date
    Aug 2005
    Posts
    26,045
    Plugin Contributions
    9

    Default Re: Custom product type with custom PRODUCT_PRICE_DISCOUNT_PREFIX

    Pertaining to your english.php folder location...

    You posted this as the location
    includes/languages/english/[MY CUSTOM TPL DIR]/english.php

    and it should be located in:
    includes/languages/[MY CUSTOM TPL DIR]/english.php

    as there is a classic folder under languages you can place [MY CUSTOM TPL DIR] in this same tree. And as english.php exists directly under language your copy gets placed in [MY CUSTOM TPL DIR] that resides directly under language also.

    Try this and you will be pleased.

    For the rest you will have to attract a coder
    Zen-Venom Get Bitten
    Get Your Business Found

  3. #3
    Join Date
    Jul 2005
    Location
    Charlottesville, VA
    Posts
    439
    Plugin Contributions
    0

    Default Re: Custom product type with custom PRODUCT_PRICE_DISCOUNT_PREFIX

    Quote Originally Posted by kobra
    Pertaining to your english.php folder location...

    You posted this as the location
    includes/languages/english/[MY CUSTOM TPL DIR]/english.php

    and it should be located in:
    includes/languages/[MY CUSTOM TPL DIR]/english.php
    Ahh, light dawns!

    Thanks very much for the correction.

 

 

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
  •