Page 217 of 245 FirstFirst ... 117167207215216217218219227 ... LastLast
Results 2,161 to 2,170 of 2445
  1. #2161
    Join Date
    Jul 2012
    Posts
    16,798
    Plugin Contributions
    17

    Default Re: Ceon URI Mapping v4.x

    To maximize the possible operation, I think this will accomplsh what was requested:
    Code:
    $productlink = zen_href_link(zen_get_info_page($products_id), 'cPath=' . ( ($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : $_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev(zen_get_products_category_id($products_id)) . '&products_id=' . $products_id);
        $cPath_new = 'cPath=' . $_GET['cPath'];
        // strip out 0_ from top level cats
        $cPath_new = str_replace('=0_', '=', $cPath_new);
    $showmorelink = zen_href_link(FILENAME_DEFAULT, $cPath_new);
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  2. #2162
    Join Date
    Jan 2010
    Location
    France
    Posts
    281
    Plugin Contributions
    0

    Default Re: Ceon URI Mapping v4.x

    I should not get a white page.

  3. #2163
    Join Date
    Jul 2012
    Posts
    16,798
    Plugin Contributions
    17

    Default Re: Ceon URI Mapping v4.x

    Quote Originally Posted by mc12345678 View Post
    To maximize the possible operation, I think this will accomplsh what was requested:
    Code:
    $productlink = zen_href_link(zen_get_info_page($products_id), 'cPath=' . ( ($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : $_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev(zen_get_products_category_id($products_id)) . '&products_id=' . $products_id);
        $cPath_new = 'cPath=' . $_GET['cPath'];
        // strip out 0_ from top level cats
        $cPath_new = str_replace('=0_', '=', $cPath_new);
    $showmorelink = zen_href_link(FILENAME_DEFAULT, $cPath_new);

    A closing parenthesis was missing from the first line:
    Code:
    $productlink = zen_href_link(zen_get_info_page($products_id),  'cPath=' . ( ($_GET['manufacturers_id'] > 0 and $_GET['filter_id'])  > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) :  $_GET['cPath'] > 0 ?  zen_get_generated_category_path_rev($_GET['cPath']) :  zen_get_generated_category_path_rev(zen_get_products_category_id($products_id))  . '&products_id=' . $products_id));
        $cPath_new = 'cPath=' . $_GET['cPath'];
        // strip out 0_ from top level cats
        $cPath_new = str_replace('=0_', '=', $cPath_new);
    $showmorelink = zen_href_link(FILENAME_DEFAULT, $cPath_new);
    In the future, please remember that a blank screen will more than likely have generated a myDebug log in the logs folder as identified in this FAQ: https://www.zen-cart.com/content.php?124-blank-page
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #2164
    Join Date
    Jan 2010
    Location
    France
    Posts
    281
    Plugin Contributions
    0

    Default Re: Ceon URI Mapping v4.x

    No
    it remains as it does before but does not show rewriting

    <a href="https://mozit:8890/index.php?main_page=product_info&cPath=7&products_id=33"><span class="a-btn-text">Buy</span></a> <a href="https://mozit:8890/index.php?main_page=index&cPath=7"><span class="a-btn-slide-text">More</span></a>
    Giovanni,
    Zen Cart V2.1

  5. #2165
    Join Date
    Jan 2010
    Location
    France
    Posts
    281
    Plugin Contributions
    0

    Default Re: Ceon URI Mapping v4.x

    Sorry I made a mistake for the product, but for the category I get it

    <href="https://mozit:8890/index.php?main_page=index&cPath=">
    Giovanni,
    Zen Cart V2.1

  6. #2166
    Join Date
    Jul 2012
    Posts
    16,798
    Plugin Contributions
    17

    Default Re: Ceon URI Mapping v4.x

    Quote Originally Posted by diamond1 View Post
    Sorry I made a mistake for the product, but for the category I get it

    <href="https://mozit:8890/index.php?main_page=index&cPath=">
    Code:
    $productlink = zen_href_link(zen_get_info_page($products_id),  'cPath=' . ( ($_GET['manufacturers_id'] > 0 and $_GET['filter_id'])  > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) :  $_GET['cPath'] > 0 ?  zen_get_generated_category_path_rev($_GET['cPath']) :  zen_get_generated_category_path_rev(zen_get_products_category_id($products_id))  . '&products_id=' . $products_id));
        $cPath_new = 'cPath=' . ( ($_GET['manufacturers_id'] > 0 and $_GET['filter_id'])  > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) :  $_GET['cPath'] > 0 ?  zen_get_generated_category_path_rev($_GET['cPath']) :  zen_get_generated_category_path_rev(zen_get_products_category_id($products_id));
        // strip out 0_ from top level cats
        $cPath_new = str_replace('=0_', '=', $cPath_new);
    $showmorelink = zen_href_link(FILENAME_DEFAULT, $cPath_new);
    Or:
    Code:
    $productlink = zen_href_link(zen_get_info_page($products_id),  'cPath=' . ( ($_GET['manufacturers_id'] > 0 and $_GET['filter_id'])  > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) :  $_GET['cPath'] > 0 ?  zen_get_generated_category_path_rev($_GET['cPath']) :  zen_get_generated_category_path_rev(zen_get_products_category_id($products_id))  . '&products_id=' . $products_id));
        $cPath_new = 'cPath=' . $cPath;
        // strip out 0_ from top level cats
        $cPath_new = str_replace('=0_', '=', $cPath_new);
    $showmorelink = zen_href_link(FILENAME_DEFAULT, $cPath_new);
    Last edited by mc12345678; 19 Oct 2017 at 12:45 PM.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #2167
    Join Date
    Jan 2010
    Location
    France
    Posts
    281
    Plugin Contributions
    0

    Default Re: Ceon URI Mapping v4.x

    No, the first white page code, the second does not change anything forever
    <href="https://mozit:8890/index.php?main_page=index&cPath=">
    Giovanni,
    Zen Cart V2.1

  8. #2168
    Join Date
    Jul 2012
    Posts
    16,798
    Plugin Contributions
    17

    Default Re: Ceon URI Mapping v4.x

    Quote Originally Posted by diamond1 View Post
    No, the first white page code, the second does not change anything forever
    <href="https://mozit:8890/index.php?main_page=index&cPath=">
    In this:
    Code:
    $productlink = zen_href_link(zen_get_info_page($products_id),  'cPath=' . ( ($_GET['manufacturers_id'] > 0 and $_GET['filter_id'])  > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) :  $_GET['cPath'] > 0 ?  zen_get_generated_category_path_rev($_GET['cPath']) :  zen_get_generated_category_path_rev(zen_get_products_category_id($products_id))  . '&products_id=' . $products_id));
        $cPath_new = 'cPath=' . ( ($_GET['manufacturers_id'] > 0 and $_GET['filter_id'])  > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) :  $_GET['cPath'] > 0 ?  zen_get_generated_category_path_rev($_GET['cPath']) :  zen_get_generated_category_path_rev(zen_get_products_category_id($products_id));
        // strip out 0_ from top level cats
        $cPath_new = str_replace('=0_', '=', $cPath_new);
    $showmorelink = zen_href_link(FILENAME_DEFAULT, $cPath_new);
    Remove the extra parentheses (highlighted above):
    Code:
    $productlink = zen_href_link(zen_get_info_page($products_id),  'cPath=' . ( ($_GET['manufacturers_id'] > 0 and $_GET['filter_id'])  > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) :  $_GET['cPath'] > 0 ?  zen_get_generated_category_path_rev($_GET['cPath']) :  zen_get_generated_category_path_rev(zen_get_products_category_id($products_id))  . '&products_id=' . $products_id));
        $cPath_new = 'cPath=' . ($_GET['manufacturers_id'] > 0 and $_GET['filter_id'])  > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) :  $_GET['cPath'] > 0 ?  zen_get_generated_category_path_rev($_GET['cPath']) :  zen_get_generated_category_path_rev(zen_get_products_category_id($products_id));
        // strip out 0_ from top level cats
        $cPath_new = str_replace('=0_', '=', $cPath_new);
    $showmorelink = zen_href_link(FILENAME_DEFAULT, $cPath_new);
    Thought that before, the use of $cPath provided a result? Ohh, sorry: it was $cpath instead as shown here:
    Quote Originally Posted by diamond1 View Post
    I have another problem, I have a slide in the home that takes the product id from the db, if I read the source code I notice that the link of the category or the product link is not generated by ceon uri I products = id etc. clicking does a normal thing, but SEOs have links on the page with rederict 301 is not the best. How can I do to generate the correct links without cpath etc.

    Code:
    $productlink=HTTP_SERVER . DIR_WS_CATALOG.'index.php?main_page=product_info&cPath='.$cpath.'&products_id='.$products_id;
    $showmorelink=HTTP_SERVER . DIR_WS_CATALOG.'index.php?main_page=index&cPath='.$cpath;
    
    <a href="<?php echo $productlink; ?>"><span class="a-btn-text">Buy now</span></a>
    <a href="<?php echo $showmorelink; ?>"><span class="a-btn-slide-text">More</span></a>
    So the second "form" could be:
    Code:
    $productlink = zen_href_link(zen_get_info_page($products_id),  'cPath=' . ( ($_GET['manufacturers_id'] > 0 and $_GET['filter_id'])  > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) :  $_GET['cPath'] > 0 ?  zen_get_generated_category_path_rev($_GET['cPath']) :  zen_get_generated_category_path_rev(zen_get_products_category_id($products_id))  . '&products_id=' . $products_id));
        $cPath_new = 'cPath=' . $cpath;
        // strip out 0_ from top level cats
        $cPath_new = str_replace('=0_', '=', $cPath_new);
    $showmorelink = zen_href_link(FILENAME_DEFAULT, $cPath_new);
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  9. #2169
    Join Date
    Jan 2010
    Location
    France
    Posts
    281
    Plugin Contributions
    0

    Default Re: Ceon URI Mapping v4.x

    now it works perfectly with the second, you've been very kind thanks thanks
    Giovanni,
    Zen Cart V2.1

  10. #2170
    Join Date
    Apr 2010
    Posts
    897
    Plugin Contributions
    0

    Default Re: Ceon URI Mapping v4.x

    Hi,

    I was about to install CEON URI into a zc155e and came here to confirm there were no conflicts. I read thru the conversation about breadcrumb issues and would prefer to avoid them.

    I have two questions. First, both Torvista and MC supply github links... which should I use?

    Second, Torvista's version is updated for php7 but I'm still running v5.5.38. Am I out of luck or is the php 7 version backwards compatible?

 

 

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