Announcement

Collapse
No announcement yet.

short links not working for category tree and products.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    short links not working for category tree and products.

    Website was working ok until I was hacked.
    That problems was solved but I now have linking problem which may or may not be related to the hacking.

    I'm using Weiland short link mod.

    - Search for products works ok. I click on a product in the search result and I go to the product and the short link displays in the address bar.

    - PLST works ok. When I click on a product link I go to the product and the short link displays in the address bar.

    BUT: when I click on my category tree links I get the following message - " Page 'Chinese_Herbal_Teas' no longer exists." ????

    Here is my htaccess file:

    ### Begin - Inserted by Miva Merchant

    DirectoryIndex /Merchant2/merchant.mvc?Screen=SFNT

    RewriteEngine On

    RewriteRule ^Merchant2/admin.mvc? - [QSA,L]

    RewriteCond %{REQUEST_FILENAME} !-s
    RewriteRule ^product/([^/.]+).html$ /Merchant2/merchant.mvc?Screen=PROD&Product_code=$1 [QSA,L]

    RewriteCond %{REQUEST_FILENAME} !-s
    RewriteRule ^category/([^/.]+).html$ /Merchant2/merchant.mvc?Screen=CTGY&Category_code=$1 [QSA,L]

    RewriteCond %{REQUEST_FILENAME} !-s
    RewriteRule ^([^/]+)/([^/.]+).html$ /Merchant2/merchant.mvc?Screen=PROD&Category_code=$1&Product_ code=$2 [QSA,L]

    RewriteCond %{REQUEST_FILENAME} !-s
    RewriteRule ^([^/.]+).html$ /Merchant2/merchant.mvc?Screen=$1 [QSA,L]

    ### End - Inserted by Miva Merchant

    ************************************************** *********

    Here is my CTGY page "Category Tree Template" file:

    <div id="category-tree">
    <mvt:foreach array="cattree_categories" iterator="cattree_category">
    <mvt:if expr="l.settings:cattree_category:code EQ g.Category_Code">
    <div class="level-&mvte:cattree_category:level; active">
    <mvt:else>
    <div class="level-&mvte:cattree_category:level;">
    </mvt:if>


    <a href="http://www.healingherbs.net/&mvta:cattree_category:code;.html">

    <mvt:if expr="l.settings:cattree_category:image">
    <img src="&mvte:cattree_category:image;" alt="&mvte:cattree_category:name;" />
    <mvt:else>
    &mvte:cattree_category:name;
    </mvt:if>
    </a>
    </div>
    </mvt:foreach>
    </div>
    **********************************************8

    Any suggestions??? Please.

    #2
    Re: short links not working for category tree and products.

    Your missing /category and /product in the short link url structures:

    <a href="http://www.healingherbs.net/category/&mvta:cattree_category:code;.html">

    <a href="http://www.healingherbs.net/product/&mvta:product:code;.html">

    Comment


      #3
      Re: short links not working for category tree and products.

      Thanks for replying.

      I added both lines and I get the same error message "Page 'Classic_Herbal_Formulas' no longer exists."

      Here is the file now:
      --------------------------------------

      <div id="category-tree">
      <mvt:foreach array="cattree_categories" iterator="cattree_category">
      <mvt:if expr="l.settings:cattree_category:code EQ g.Category_Code">
      <div class="level-&mvte:cattree_category:level; active">
      <mvt:else>
      <div class="level-&mvte:cattree_category:level;">
      </mvt:if>


      <a href="http://www.healingherbs.net/category/&mvta:cattree_category:code;.html">

      <a href="http://www.healingherbs.net/product/&mvta:product:code;.html">

      <a href="http://www.healingherbs.net/&mvta:cattree_category:code;.html">

      <mvt:if expr="l.settings:cattree_category:image">
      <img src="&mvte:cattree_category:image;" alt="&mvte:cattree_category:name;" />
      <mvt:else>
      &mvte:cattree_category:name;
      </mvt:if>
      </a>
      </div>
      </mvt:foreach>
      </div>

      Comment


        #4
        Re: short links not working for category tree and products.

        This is the only line needed for the category tree:
        <a href="http://www.healingherbs.net/category/&mvta:cattree_category:code;.html">

        Do you have anything else in your .htaccess file? In re-reading your initial post, you stated you are using the Emporium Plus short link mod, however the rewrites shown are for the stock Miva Merchant short links. I suspect you have conflicting rewrites if both are in place.

        Comment


          #5
          Re: short links not working for category tree and products.

          Originally posted by herbchina View Post
          Thanks for replying.

          I added both lines and I get the same error message "Page 'Classic_Herbal_Formulas' no longer exists."

          Here is the file now:
          --------------------------------------

          <div id="category-tree">
          <mvt:foreach array="cattree_categories" iterator="cattree_category">
          <mvt:if expr="l.settings:cattree_category:code EQ g.Category_Code">
          <div class="level-&mvte:cattree_category:level; active">
          <mvt:else>
          <div class="level-&mvte:cattree_category:level;">
          </mvt:if>


          <a href="http://www.healingherbs.net/category/&mvta:cattree_category:code;.html">

          <a href="http://www.healingherbs.net/product/&mvta:product:code;.html">

          <a href="http://www.healingherbs.net/&mvta:cattree_category:code;.html">

          <mvt:if expr="l.settings:cattree_category:image">
          <img src="&mvte:cattree_category:image;" alt="&mvte:cattree_category:name;" />
          <mvt:else>
          &mvte:cattree_category:name;
          </mvt:if>
          </a>
          </div>
          </mvt:foreach>
          </div>
          This all depends on how you have the identifiers set up so it looks like you have CTGY for categories
          http://www.healingherbs.net/CTGY/Her...um_Flower.html

          and PROD for products
          http://www.healingherbs.net/PROD/4970.html

          You will need to adjust the ctgy tree code and links accordingly or simply change the identifiers - which are set on the SEO tab of Domain settings.

          Make sure you also implement the canonical tags for your pages.
          Last edited by Mark Hood; 01-03-13, 11:10 AM.
          Mark Hood
          Vermont Gear

          Comment


            #6
            Re: short links not working for category tree and products.

            Mark,

            Look at the rewrite example provided, they are using /product and /category. I suspect we are not seeing the full .htaccess as those are stock Miva Merchant rewrites and he stated that the Emporium Plus module was in use.

            RewriteCond %{REQUEST_FILENAME} !-s
            RewriteRule ^product/([^/.]+).html$ /Merchant2/merchant.mvc?Screen=PROD&Product_code=$1 [QSA,L]

            RewriteCond %{REQUEST_FILENAME} !-s
            RewriteRule ^category/([^/.]+).html$ /Merchant2/merchant.mvc?Screen=CTGY&Category_code=$1 [QSA,L]
            /CTGY and /PROD fire an Internal Server error. Need to see the full .htaccess and determine what the ultimate url structure should be.
            Last edited by Dan - Glendale Designs; 01-03-13, 11:17 AM.

            Comment


              #7
              Re: short links not working for category tree and products.

              Thank you both. You hit the nail on the head. Everything is working now on this website. Now I'll work on my ohter website with similar problem.

              Thanks, again.

              Comment


                #8
                Re: short links not working for category tree and products.

                I'm back and working on my second website with a similar problem.

                - Search Option (Long address url ) displays product list and clicking on product takes me to the product screen. - NO PROBLEM HERE.

                - Product List (Option (Long address URL) displays a product listing. Clicking on a product code result in blank page w/message "Page '3703' no longer exists." URL is " http://www.healingherbsofchina.com/3703.html" - WHY???

                - Category Tree - Clicking on a category results in a blank page w/ message "Page 'Chinese_Herbal_Teas' no longer exists. " and the URL is short - http://www.healingherbsofchina.com/C...rbal_Teas.html - PROBLEM!!!

                Here is my htaccess file:


                DirectoryIndex /Merchant2/merchant.mvc

                RewriteEngine on
                RewriteCond %{REQUEST_URI} !-s
                RewriteRule ^page/(.*) /Merchant2/merchant.mvc?page=$1
                RewriteBase /
                RewriteRule ^(.*)\.mv$ $1 [C,E=WasMV:yes]
                RewriteCond %{REQUEST_FILENAME}.mvc -f
                RewriteRule ^(.*)$ $1.mvc [S=1]
                RewriteCond %{ENV:WasMV} ^yes$
                RewriteRule ^(.*)$ $1.mv

                ### -------------------------------------------------


                ### Begin - Inserted by Miva Merchant

                DirectoryIndex /Merchant2/merchant.mvc?Screen=SFNT

                RewriteEngine On

                RewriteRule ^Merchant2/admin.mvc? - [QSA,L]

                RewriteCond %{REQUEST_FILENAME} !-s
                RewriteRule ^product/([^/.]+).html$ /Merchant2/merchant.mvc?Screen=PROD&Product_code=$1 [QSA,L]

                RewriteCond %{REQUEST_FILENAME} !-s
                RewriteRule ^category/([^/.]+).html$ /Merchant2/merchant.mvc?Screen=CTGY&Category_code=$1 [QSA,L]

                RewriteCond %{REQUEST_FILENAME} !-s
                RewriteRule ^([^/]+)/([^/.]+).html$ /Merchant2/merchant.mvc?Screen=PROD&Category_code=$1&Product_ code=$2 [QSA,L]

                RewriteCond %{REQUEST_FILENAME} !-s
                RewriteRule ^([^/.]+).html$ /Merchant2/merchant.mvc?Screen=$1 [QSA,L]

                ### End - Inserted by Miva Merchant

                -----------------------------------------------------------
                Here is my Cegory Tree Template file:

                <mvt:if expr="l.settings:cattree:stack EQ 0">
                <mvt:item name="category_tree" param="cattree_header" />
                </mvt:if>
                <mvt:if expr="l.settings:nextcount GT 0">
                <table border=0 cellpadding="0" cellspacing="0">
                <tr>
                <mvt:if expr="l.settings:cattree:stack GT 0">
                <td width="1%"><img src="graphics/en-US/admin/blank.gif" height="1" width="8" border=0></td>
                </mvt:if>

                <td nowrap>
                <a href="&mvt:global:sessionurl;Screen=BASK&Store_Cod e=&mvt:global:Store_Code;">

                <br>

                <mvt:item name="category_tree" param="nextlevel">
                <mvt:foreach iterator="cattree_category" array="categories">

                <font face="Arial, Helvetica" size="-1" color="green">

                <mvt:if expr="l.settings:cattree_category:code EQ g.Category_code">
                <mvt:if expr="NOT l.settings:cattree_category:image">
                <b>&mvt:cattree_category:name;</b>
                <mvt:else>
                <img src="&mvte:cattree_category:image;" alt="&mvte:cattree_category:name;" border=0>
                </mvt:if>
                <mvt:else>
                <mvt:if expr="l.settings:cattree_category:image">
                <a href="&mvt:global:sessionurl;Screen=CTGY&Store_Cod e=&mvta:store:code;&Category_Code=&mvta:cattree_ca tegory:code;"><img src="&mvte:cattree_category:image;" alt="&mvte:cattree_category:name;" border=0></a>
                <mvt:else>


                <a href="http://www.healingherbsofchina.com/&mvta:cattree_category:code;.html">&mvt:cattree_ca tegory:name;</a>



                </mvt:if>
                </mvt:if>
                </font>
                <br>
                <mvt:if expr="l.settings:cattree_category:id EQ l.settings:cattreenext">
                <mvt:item name="category_tree"/>
                </mvt:if>
                </mvt:foreach>
                </mvt:item>
                </td></tr>
                </table>
                </mvt:if>
                <mvt:if expr="l.settings:cattree:stack EQ 0">
                <mvt:item name="category_tree" param="cattree_footer" />
                </mvt:if>
                --------------------------------------------------------

                HELP ANYONE?? PLEASE

                Comment


                  #9
                  Re: short links not working for category tree and products.

                  Same thing, the rewrites you have in place are looking for /category and /product:
                  http://www.healingherbsofchina.com/c..._Formulas.html

                  This is determined by these two lines implemented by the stock Miva Merchant short link functionality within the .htacess file:

                  RewriteCond %{REQUEST_FILENAME} !-s
                  RewriteRule ^product/([^/.]+).html$ /Merchant2/merchant.mvc?Screen=PROD&Product_code=$1 [QSA,L]

                  RewriteCond %{REQUEST_FILENAME} !-s
                  RewriteRule ^category/
                  ([^/.]+).html$ /Merchant2/merchant.mvc?Screen=CTGY&Category_code=$1 [QSA,L]

                  That said, are you changing your existing url structure? If so, it may be necessary to implement 301 redirects from the old structure to the new in order to maintain any existing search engine rankings as much as possible.
                  Last edited by Dan - Glendale Designs; 01-03-13, 06:27 PM.

                  Comment


                    #10
                    Re: short links not working for category tree and products.

                    Thanks,
                    Domain settings is using "product" & "category".

                    I just spotted an error in the category tree file and everything is ok with the Category tree links. They now take me to the category product listing display.

                    BUT When I click on a product I still get an error message "Page '3703' no longer exists" (3703 is a product code.)

                    Which file is the problem in - .
                    Category Product List Layout or Product Display Layout??

                    Comment


                      #11
                      Re: short links not working for category tree and products.

                      Originally posted by herbchina View Post
                      Thanks,
                      Domain settings is using "product" & "category".

                      I just spotted an error in the category tree file and everything is ok with the Category tree links. They now take me to the category product listing display.

                      BUT When I click on a product I still get an error message "Page '3703' no longer exists" (3703 is a product code.)

                      Which file is the problem in - .
                      Category Product List Layout or Product Display Layout??

                      You need to edit the product display layout tab of the CTGY page. The actual link you that currently have surrounding your product image and product name is incorrect for the way you have the product identifier set up.
                      Mark Hood
                      Vermont Gear

                      Comment


                        #12
                        Re: short links not working for category tree and products.

                        Mark,

                        Here is the file for "Products Display Layout". What should be changed?? Thanks.

                        ----------------------
                        <table border="0" cellpadding="5" cellspacing="0">
                        <tr><td align="left" valign="middle" colspan="2">
                        <mvt:item name="fonts" param="hdr_font">
                        <b>&mvt:product:name;</b>
                        </mvt:item>
                        </td></tr>
                        <tr><td align="left" valign="middle" colspan="2">&nbsp;</td></tr>
                        <tr>
                        <td align="center" valign="top" rowspan="4">
                        <mvt:if expr="NOT ISNULL l.settings:product:image">
                        <img src="&mvte:product:image;" alt="&mvte:product:name;">
                        <mvt:else>
                        &nbsp;
                        </mvt:if>
                        </td>
                        <td align="left" valign="top">
                        <mvt:item name="fonts" param="body_font">
                        Quantity in Basket:
                        <mvt:if expr="l.settings:product:quantity EQ 0">
                        <i>None</i>
                        <mvt:else>
                        <b>&mvt:product:quantity;</b>
                        </mvt:if>
                        <br>
                        Code: <b>&mvt:product:code;</b><br>
                        Price: <b><span id="price-value">&mvt:product:formatted_price;</span></b><br>
                        <mvt:if expr="l.settings:product:weight NE 0">
                        Shipping Weight: <b>&mvt:product:weight;</b> &mvt:store:wtunits;<br>
                        </mvt:if>
                        <span id="inventory-message">
                        <mvt:if expr="l.settings:product:inv_active">
                        &mvt:product:inv_long;
                        </mvt:if>
                        </span>
                        </mvt:item>
                        </td></tr>
                        <tr>
                        <td id="swatches" class="swatches">&nbsp;</td>
                        </tr>
                        <form method="post" action="&mvt:global:sessionurl;">
                        <input type="hidden" name="Action" value="ADPR">
                        <input type="hidden" name="Screen" value="PROD">
                        <input type="hidden" name="Store_Code" value="&mvte:store:code;">
                        <input type="hidden" name="Product_Code" value="&mvte:product:code;">
                        <input type="hidden" name="Category_Code" value="&mvte:global:category_code;">
                        <tr><td>&nbsp;</td></tr>
                        <tr><td align="left" valign="top">
                        <mvt:item name="product_attributes" param="product:id" />
                        </td></tr>
                        <tr><td align="left" valign="middle">
                        <mvt:item name="fonts" param="body_font">
                        Quantity:
                        <input type="text" name="Quantity" value=1 size=4>
                        <mvt:item name="buttons" param="AddToBasket" />
                        </mvt:item>
                        </td></tr>
                        </form>
                        <tr><td align="left" valign="middle" colspan="2">&nbsp;</td></tr>
                        <tr><td align="left" valign="middle" colspan="2">
                        <mvt:item name="fonts" param="body_font">
                        &mvt:product:descrip;
                        </mvt:item>
                        </td></tr>
                        </table>
                        _________________________________________

                        Comment


                          #13
                          Re: short links not working for category tree and products.

                          http://www.healingherbsofchina.com/product/3703.html

                          Comment


                            #14
                            Re: short links not working for category tree and products.

                            http://www.healingherbsofchina.com/product/3703.html

                            Sorry, but I don't understand what you mean by showing this url.

                            Comment


                              #15
                              Re: short links not working for category tree and products.

                              Your rewrites are setup so that category links use the identifier of /category. Product links use an identifier of /product. If the identifier is not in place, the urls will fire as page not found.

                              Comment

                              Working...
                              X