+ Reply to Thread
Results 1 to 13 of 13

Thread: Need help creating hyperlink to a content page

  1. #1
    Client
    Join Date
    Oct 2009
    Posts
    16
    Squirrelcart version
    not specified!

    Need help creating hyperlink to a content page

    I'd like to create a hyperlink that can display a content page that I have created in squirrel cart. This is what I have done:

    1) created content page
    2) created a LINK to link to the content page
    3) copied the link unique ID
    4) tried to link to the page using www.mywebsite.com/index.php?sc_page=<link unique ID>

    I'm just getting a blank page within my web content area. Am I missing something?

  2. #2
    Squirrelcart Staff Jamie's Avatar
    Join Date
    May 2002
    Posts
    6,829
    Squirrelcart version
    v3.3.7
    4) tried to link to the page using www.mywebsite.com/index.php?sc_page=<link unique ID>
    Use the link record number instead:
    http://www.example.com/index.php?sc_page=<link record_number>

    as in:

    http://www.example.com/index.php?sc_page=38

    I would only recommend hard coded a link URL like that if you are putting the link on a page out of Squirrelcart's control. If you are not, see this page for instructions on how to add a link via PHP, which will ensure it still works if you decide to change your domain name, or decide to move Squirrelcart to a subdirectory:
    http://squirrelcart.com/help/?Links_-_Overview.html

  3. #3
    Client
    Join Date
    Oct 2009
    Posts
    16
    Squirrelcart version
    not specified!

    That works!

    Jaime,

    Thanks for the VERY quick reply!

    Cynthia

  4. #4
    Registered User
    Join Date
    May 2008
    Posts
    27
    Squirrelcart version
    not specified!

    And with a product?

    I tried the same thing, but with a Product link, and I got a 404 error.

    1. Created a product link

    2. myexample.com/index.php?sc_page=41

    Also tried experimenting with sc_product=41, no 404 error this time, just an empty page.

    Where'd I go wrong?

  5. #5
    Squirrelcart Staff Jamie's Avatar
    Join Date
    May 2002
    Posts
    6,829
    Squirrelcart version
    v3.3.7
    If you have a record in your Links table with the record_number 41, that URL should work. I'd need access to your site via our heldpesk to determine why it's not working.

  6. #6
    Registered User
    Join Date
    May 2008
    Posts
    27
    Squirrelcart version
    not specified!
    Oh, and I also get this at the top of the 404 page:

    Warning: extract() [function.extract]: First argument should be an array in /home/mochajoe/public_html/store/squirrelcart/functions/storefront/common/catalog_viewing/sc_page_content.func.php on line 42

  7. #7
    Squirrelcart Staff Jamie's Avatar
    Join Date
    May 2002
    Posts
    6,829
    Squirrelcart version
    v3.3.7
    I have no clue what is causing that. Without access to your site, I don't have much to go on.

  8. #8
    Client
    Join Date
    Nov 2006
    Location
    Illinois
    Posts
    193
    Squirrelcart version
    v3.3.4
    Jamie, I am having the same issue, I have SEO turned on if I try it with the link from the primary links i get my 404 page as well, if I try it with link using record 41 it converts it to the SEO page, and gives a 404

    I am so glad I found this post, never realized this feature existed, basically what I was looking for in the emails I sent you. when I get the links working I will be super happy.
    Attached Images

  9. #9
    Squirrelcart Staff Jamie's Avatar
    Join Date
    May 2002
    Posts
    6,829
    Squirrelcart version
    v3.3.7
    The original poster's link was not working because the link was not to "Content". It was to a product, which can be linked to using it's normal storefront URL.

    In your case, that link should work. As with the original poster, I don't have the means to help you with this without access to your site via a helpdesk ticket.

  10. #10
    Client
    Join Date
    Nov 2006
    Location
    Illinois
    Posts
    193
    Squirrelcart version
    v3.3.4
    Jamie,

    I found the issue was I was using SEO with no filename, and the documentation for the mod rewrite, which I did not realize does not show you to use content

    Once I added that in it started working. Did not even think about that section until i went to basic, and it worked and worked forward (I actually forgot I did the mod rewrite as it was a couple of weeks ago)
    Code:
    Setup Instructions Using Mod_Rewrite
    
    Mod_Rewrite is a feature built into Apache web servers that allows you to transform the URL requested by a client into a different URL without the client seeing their URL change in their browser. With this method, when the customer requests a URL like:
    
    http://www.example.com/products/coffee-table
    
    Mod_Rewrite will change their request to include your storefront page without changing the URL in their browser: 
    
    http://www.example.com/store.php/products/coffee-table
    
       1. Follow the instructions above in the section titled Setting up SEO URLs
       2. Create a blank file with the name .htaccess in the same folder that contains your storefront page.
       3. Using a text editor, paste the following code into your blank .htaccess file:
    
          RewriteEngine On
          RewriteRule ^(products|categories|news|reviews|testimonials)/?(.*)$ store.php/$1/$2 [L]
       4. If you've renamed your storefront page from it's default name of store.php, change that string from "store.php" to your actual storefront page name.
       5. Save the file
       6. Try loading your storefront page in a browser to confirm that your .htaccess file is not causing any errors. If you receive an Internal Server error, you either have a typo in your htaccess file OR your server doesn't support mod_rewrite. If you believe the problem is the latter, stop here and try the instructions further down labeled "Instructions Using ForceType/SetHandler".
       7. Try loading the following URL (changing the domain name in the example to match yours):
    
          http://www.example.com/products/
    
          If you receive a page looking like your storefront page but with a red 404 error in the center, then the process worked. The 404 error appears because you aren't linking to a specific category. If you receive an Internal Server Error, your server probably doesn't support mod_rewrite - stop here and try the instructions below for ForceType/SetHandler.
       8.  Now that you have your .htaccess file configured and working properly, you just need to tell Squirrelcart to remove the storefront page from the URLs that it generates. To do this, check the No Filename field on your Store Settings page, in the section labeled SEO URLs and click the "save changes" button.
       9. You're done! Head to your storefront page and click your product and category links to make sure they are working OK.

  11. #11
    Squirrelcart Staff Jamie's Avatar
    Join Date
    May 2002
    Posts
    6,829
    Squirrelcart version
    v3.3.7
    Hi Dave,

    Glad you figured it out. Have a nice Halloween.

  12. #12
    Client Beery_Asst's Avatar
    Join Date
    Feb 2006
    Location
    Houston, TX
    Posts
    189
    Squirrelcart version
    v3.4.0
    I found this thread, but thus far, what was posted is not working for me.

    I have a content record, record #28, I wish to display when a user clicks a hyperlink on my storefront.

    According to the posts here, I should be setting the hyperlink to:

    http://www.uswingnuts.com/store.php?sc_page=28

    Is this correct?

  13. #13
    Client Beery_Asst's Avatar
    Join Date
    Feb 2006
    Location
    Houston, TX
    Posts
    189
    Squirrelcart version
    v3.4.0
    Never mind, I figured it out. I was using a content record number, not a link record number.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts