Results 1 to 10 of 2445

Hybrid View

  1. #1
    Join Date
    Jan 2010
    Location
    France
    Posts
    291
    Plugin Contributions
    0

    Default Re: Ceon URI Mapping v4.x

    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.

    $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>
    Giovanni,
    Zen Cart V2.1

  2. #2
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,845
    Plugin Contributions
    25

    Default Re: Ceon URI Mapping v4.x

    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.

    $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>
    replying from my phone, so I can not give the right syntax, but you should use the zen_href_link function, instead of the hardcoded link.

  3. #3
    Join Date
    Jan 2010
    Location
    France
    Posts
    291
    Plugin Contributions
    0

    Default Re: Ceon URI Mapping v4.x

    Hi, you can give me an example
    Giovanni,
    Zen Cart V2.1

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

    Default Re: Ceon URI Mapping v4.x

    When you can of course hihih
    Giovanni,
    Zen Cart V2.1

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

    Default Re: Ceon URI Mapping v4.x

    Torvista can you help me? do I get the solution?
    Giovanni,
    Zen Cart V2.1

  6. #6
    Join Date
    Jul 2012
    Posts
    16,817
    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...

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

    Default Re: Ceon URI Mapping v4.x

    I should not get a white page.

  8. #8
    Join Date
    Jul 2012
    Posts
    16,817
    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...

  9. #9
    Join Date
    Jan 2010
    Location
    France
    Posts
    291
    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

 

 

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

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