How to add extra link to display Size chart

Tagged: ,

ThemeBurn SupportForumsOpenCart ThemesPavilion OpenCart ThemeHow to add extra link to display Size chart

This topic has been marked as resolved.

I was wondering how I would go about adding an extra link to my product pages that would open a an overlay to display a size chart to clients. Ideally, I would like to place it under the same div that “Add to Wish List & Add to Compare” links are located in the product page.

Best guess is that I would need to modify a .tpl file, but not sure where to go from here. Thanks for any help you guys can give me on this issue!

March 7, 2016 at 9:07 pm #45345

I just finished working on this but would like some expert help to refine it….

I’l give you the steps and then maybe you or tb support can chime in..

before you start, backup your file(s)

1. First I created an info page for the size chart.
http://surplusjoe.com/size-charts (this is temp domain so we don’t have a cert (its safe)

2. Insert following line in catalog>view>them>pavilion>template>product>product.tpl
<a class="tb_main_color" href="../size-charts" target="popup" onclick="window.open('../size-charts','name','width=600,height=400')">Size Charts</a>

I used a popup because I didn’t want them to navigate off-page

I inserted this on line 515 of 1.2.9 oc2 version of pavilion (just under tb_actions divtag)

result is as shown here…. above wishlist to the right of add to cart button

https://surplusjoe.com/clothing/camoflauge-uniforms/british-multicam-ubac-combat-shirt.html

  • This reply was modified 2964 days ago by  bigmoon. Reason: reads better
  • This reply was modified 2964 days ago by  bigmoon.
  • This reply was modified 2964 days ago by  bigmoon.
  • This reply was modified 2964 days ago by  bigmoon. Reason: fixing codeview
  • This reply was modified 2964 days ago by  bigmoon.
  • This reply was modified 2964 days ago by  bigmoon.
  • This reply was modified 2964 days ago by  bigmoon. Reason: results location
March 8, 2016 at 2:43 am #45346

Obviously this is far from perfect, I was hoping you or tb support could chime in and tell me how to do it correctly so that…

1. “size chart” would not display unless there actually was a “size option”
2. It could display different size charts, ie/pants/shirts/hats etc… depending on the product option.
3. hide all of the theme options on the info page so it only showed the info page content (and not as a separate complete website view)

Tx, Much

March 8, 2016 at 2:54 am #45353

using lightbox would definitely work, but I’m sure something along these lines already exists in the theme. just not sure what it is, or where.

March 8, 2016 at 7:22 am #45367

we’ll just have to wait until TB support chimes in I guess, but at least there is an interim stop gap, much as I think it should be better.. its better than nothing. I don’t want people leaving the page to look for a size chart.

March 8, 2016 at 9:02 am #45368

I’m going to try and integrate lightbox and see if that works, I’m really just afraid it may break something which is the last thing I’d like to add to my list of fixes.

March 8, 2016 at 4:54 pm #45377

backup whole dir and DB before you start l then its easy to fix if it breaks something

March 8, 2016 at 9:03 pm #45378
You will need to register in order to post topics and read replies in the ThemeBurn.com support forums!
March 14, 2016 at 1:01 am #45471

I see same problem as terms popup > looks like this See Video >> http://screencast.com/t/tOAzk8CNMFsG Although image shown is vid for tems popup, the result is the same on size chart popup.

March 14, 2016 at 3:58 pm #45516

Fixed it with this:
<a class="tb_main_color page_popup" href="index.php?route=information/information/agree&information_id=11">Size Charts</a>

and this

tbApp.onScriptLoaded(function() {
      tbCreateDialog($('.page_popup'));
});

March 14, 2016 at 7:32 pm #45526

Hi,

There was a small error in step 3. We’ve edited it and now, the code should work.

BR,
ThemeBurn team

March 17, 2016 at 11:33 am #45605

Thanks guys, works perfectly… only thing thats odd, is that the link is a different colour than the other two, so it looks off. What class can I use to fix this and make sure it uses the same link attributes as the rest of the site. Or am I better off just hard coding it in the product.tpl page.

  • This reply was modified 2938 days ago by  puckmugger.
April 2, 2016 at 5:50 pm #46084

Ok, so everything is perfect, but I seem to have this css border around the close button on the top right. Where can I disable this?

Heres’ a screenshot of what I’m referrring to:

April 2, 2016 at 9:22 pm #46087

@puckmugger

Can we take a look at the live example?

You can use hidepost to share private information with the support staff.

BR,
ThemeBurn team

April 5, 2016 at 5:55 pm #46178

Using the same technique I got it into the pav 2.x theme page almost same as before…

however it wants to align differently, anyone have some css to solve it without messing up responsive ?

>> http://screencast.com/t/7oMcyPPbIa

  • This reply was modified 2843 days ago by  bigmoon.
July 7, 2016 at 10:37 am #49403
Viewing 15 posts - 1 through 15 (of 26 total)
  • The topic ‘How to add extra link to display Size chart’ is closed to new replies.