Direct URL link to product tab?

Hi!

I have cscart 2.2 and is it possible to give a url directly to a product and open in a specific tab?

For example if I go to “www.store.com/product-for-sale” … it will always show the product with the ‘Description’ tab open, which is perfectly good for normal operation.



But since there are other product tabs (Features, Reviews, etc) … is there some way to do something with a direct URL like ‘www.store.com/product-for-sale?dispatch=reviews’ that will go to the product and open the (in this case) the Reviews tab instead of the default ‘Description’ tab?



:grin: thank you very much!!! :grin:

Just create a product and enable/disable whatever tabs you want within the page.

Products_Products - Administration panel.jpg

It's quite simple really…



Go to Design > Product Tabs



However over the “Edit” link for each tab and note the ID number in the URL, which you can identify as below:


myadmin.php?dispatch=tabs.update&tab_data[tab_id]=17&return_url=tabs.manage



As you can see, this particular tab has an ID number of '17'. In my case, tab ID 17 is the custom 'Ask a Question' tab. You therefore use this ID number in the product URL like so to load the page with the 'Ask a Friend' tab open as default:


http://www.mystore.com/my-product-name#product_tab_17



As an example, see the following link: Desser Value Sofa and Chairs

Thank you for your replies … But maybe the Product Tabs feature is not there in cs-cart 2.2.x?

I can only go into the Product>>Blocks>>PRODUCT DETAILS PAGE TABS … and then here I can add new blocks which adds a product tab.



But I do not see the Product Tabs as seen in The Tool's picture … and under the Design I have:



Design

Logos

Design Mode

Blocks

Quick Links

Top Menu

Sitemap

Template Editor

Skin Selector



Am I missing something in my cs-cart 2.2 or does the Product TaB extra feature start in cs-cart 3?

Unfortunately it's only a feature in 3.x and not 2.2.x.

oh crap :-(

That's not a problem, it just means you use the blocks name, instead of the ID, so it's only slightly differently, but a similar idea applies.



Go to your product page on the front-end.



Right-click on the page and View Source (in most web browsers this should be an option)



In the source code, find (press Ctrl+F to search) “block_description” - you will see a bunch of code like this:

```php


```
To link directly so a tab opens when the page is loaded, use the name in the ID value, eg:
```php http://yourstore.com/product-name#block_product_inquiry ```

[quote name=‘StellarBytes’ timestamp=‘1370623599’ post=‘163215’]

That’s not a problem, it just means you use the blocks name, instead of the ID, so it’s only slightly differently, but a similar idea applies.



Go to your product page on the front-end.



Right-click on the page and View Source (in most web browsers this should be an option)



In the source code, find (press Ctrl+F to search) “block_description” - you will see a bunch of code like this:

<br />
<ul><br />
<li class="cm-js" id="block_description"><a>Description</a></li><br />
<li class="cm-js" id="block_features"><a>Features</a></li><br />
<li class="cm-js" id="block_discussion"><a>Reviews</a></li><br />
<li class="cm-js" id="block_send_to_friend"><a>Send to Friend</a></li><br />
<li class="cm-js cm-active" id="block_product_inquiry"><a>Ask a Question</a></li><br />
<li class="cm-js" id="block_price_match"><a>Price Match</a></li><br />
</ul><br />

```<br />
To link directly so a tab opens when the page is loaded, use the name in the ID value, eg:<br />
```php
http://yourstore.com/product-name#block_product_inquiry
```<br />
[/quote]<br />
<br />
That's it!! Thank you @StellarBytes!! <img src="upload://7O47Vg5oKdRIES6TKXXFKIm5Kdf.png" class="bbc_emoticon" alt=":D"><br />
<br />
I just added [b]#block_discussion[/b] to the end of the URL and tested...it loaded up a product page and went right to the Reviews!!<br />
<br />
Thank you so much!

StellarBytes this work perfect in V3 but don't work in v4 do you know how to do it?

thank you!

Without looking into too much detail, it appears the JavaScript is different and the handler for #tabname or #id has been removed, for what it's worth, it doesn't work on 4.1.2 Product build (ie. CS-Cart Labs) so I doubt this is being fixed (or added) in the next public release (4.1.1 or 4.1.2). You would likely have to go down the route of creating some custom JavaScript for this to work as it does in V2 and V3.

:(

someone have idea how to do this in 4.2.3?

At first please check tab IDs



Clip2Net — screen capture tool for Windows, Android, iPad, Mac, Linux



Then use the url in the following format:



http://demo.cs-cart.com/electronics/tv-and-video/plasma-tvs/46-class-45.9-diag.-lcd-610-series-tv/?selected_section=discussion




Check result

Thank you



You are welcome! :D

[quote name=‘eComLabs’ timestamp=‘1417444189’ post=‘198467’]

You are welcome! :D

[/quote]



eComLabs, I really appreciate your help. you’re the best!



just I have one more question:



how could I get the that smooth scroll effect to position exactly or near in the tab?



example that scroll effect that have the checkout page:



You should put the following code somewhere on the page:


```php

{if $smarty.request.selected_section}


{/if}

```

Dear [color=#000000]eCom[/color][color=#008000]labs[/color][color=#006400], [/color]thanks for your reply![color=#006400] 8)[/color]

but it’s doesn’t work yet. I have that code already in the page, it open the tab, but doesn’t scroll down ↓

here the link: http://rafass.com/ropa/primavera-verano/camisetas/camisetas-manga-corta/a-and-f/camiseta-af8807/?selected_section=product_inquiry



Where did you add the last code? I do not see it in the source of the page. Try to clear a cache at first.

[quote name='eComLabs' timestamp='1417618882' post='198666']

Where did you add the last code? I do not see it in the source of the page. Try to clear a cache at first.

[/quote]

Thanks again for your reply!

where is the best place to put the code_?

I've tried in some places but doesn't work yet, even after clear cache.