Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2005
    Location
    Charlottesville, VA
    Posts
    431
    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
    Location
    Arizona
    Posts
    27,761
    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

  3. #3
    Join Date
    Jul 2005
    Location
    Charlottesville, VA
    Posts
    431
    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.

 

 

Similar Threads

  1. Expanding search to work with my custom product-type
    By elastic in forum Setting Up Categories, Products, Attributes
    Replies: 21
    Last Post: 3 Jan 2009, 12:48 AM
  2. Custom Product Type
    By DCE in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 24 Oct 2006, 05:23 AM
  3. template_func.php not working with custom product type
    By dbrewster in forum Bug Reports
    Replies: 11
    Last Post: 28 Sep 2006, 04:20 AM
  4. Custom Product Type Help - Manufacturers
    By voltage in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 12 Jul 2006, 04:00 AM
  5. Is a custom product-type useful here?
    By MaryK in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 12 Jun 2006, 04:09 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