Results 1 to 10 of 2445

Threaded View

  1. #11
    Join Date
    Feb 2009
    Posts
    98
    Plugin Contributions
    1

    Idea or Suggestion Re: Ceon URI Mapping v4.x

    Quote Originally Posted by conor View Post
    Yes, you'd have to add custom for each custom product type the store uses.
    ceon
    I've just spent some time debugging this and thought I'd post here to help others in the same situation. If I've missed documentation covering this, please accept my apologies. If I haven't missed docs, please add some to this effect :) it would have saved some head scratching. This is pretty simple stuff, but hard to get into as a newcomer to the URI Mapping mod.

    We have a custom product type "product_light" which was created following the standard Zen Cart approach of copying an existing product type, in my case the product_music files, and hacking the custom attributes to our requirements.

    1/ We therefore have a custom admin/includes/modules/product_light/update_product.php, so the update_product action causes this update_product.php to be executed when saving changes to products, due to the code in admin/product.php that runs your custom update_product.php if it exists. So we have to copy the CEON modifications from admin/includes/modules/update_product.php to make any URI mappings be saved to the database. There's only one block, marked with "CEON URI MAPPING 1 of 1".

    2/ We need a constant for our product type filename, just so we don't have to hardcode the string anywhere, so in includes/extra_datafiles/our_custom_stuff.php we include:
    Code:
    define('FILENAME_PRODUCT_LIGHT_INFO', 'product_light_info');
    I am not clear whether this needs doing for admin/includes/extra_datafiles/our_custom_stuff.php also.

    3/ Update includes/classes/class.CeonURIMappingHREFLinkBuilder.php to ADD line 238:
    Code:
    $main_page == FILENAME_PRODUCT_LIGHT_INFO ||
    4/ Update includes/classes/class.CeonURIMappingHandler.php to ADD line 442:
    Code:
    				$_GET['main_page'] == FILENAME_PRODUCT_INFO ||
    and line 513:
    Code:
    						$_GET['main_page'] == FILENAME_PRODUCT_LIGHT_INFO ||
    5/ Update admin/includes/classes/class.CeonURIMappingAdminProductPages.php to ADD line 940:
    Code:
    				FILENAME_PRODUCT_LIGHT_INFO,
    and line 1436:
    Code:
    				FILENAME_PRODUCT_LIGHT_INFO,
    With these modifications in place, the URI mappings for our custom product types seem to work.

    In summary, it would be nice if some of theses lists of FILENAME_* constant usages were driven by the product_types database table, if possible, as that would reduce the necessity to hardcode these lists of known product types, but perhaps it isn't that simple.
    Last edited by neekfenwick; 13 Sep 2011 at 05:51 AM. Reason: Buggered up one of the lines to insert.

 

 

Similar Threads

  1. v139d Ceon uri mapping, how to generate uri mapping for bulk bulk-imported products?
    By mybiz9999 in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 8 Jan 2013, 06:52 AM
  2. CEON URI Mapping
    By jmkent in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 22 Nov 2012, 04:28 PM
  3. Ceon URI Mapping (SEO)
    By conor in forum All Other Contributions/Addons
    Replies: 2906
    Last Post: 9 Sep 2011, 08:31 AM
  4. Ceon URI Mapping v4
    By conor in forum All Other Contributions/Addons
    Replies: 110
    Last Post: 14 Aug 2011, 02:51 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