Commit cf111fc6d1b97a72c1a3796af2ad1360f3803cbf
1 parent
d35f7a56
Product hash fix
Showing
6 changed files
with
7 additions
and
5 deletions
Show diff stats
console/migrations/m170303_130758_add_columns_synonym.php
100644 → 100755
frontend/views/catalog/product.php
| ... | ... | @@ -490,11 +490,13 @@ |
| 490 | 490 | productHash = productHash.replace('#','') |
| 491 | 491 | |
| 492 | 492 | var productUl = $('ul.product_mod li') |
| 493 | - var productA = productUl.find('a#'+productHash) | |
| 494 | - productUl.removeClass('active') | |
| 495 | - productA.parent().addClass('active') | |
| 496 | - var dataLink = productA.attr('data-imageoriginal') | |
| 497 | - var dataImg = productA.attr('data-image') | |
| 493 | + if(productHash) { | |
| 494 | + var productA = productUl.find('a#'+productHash) | |
| 495 | + productUl.removeClass('active') | |
| 496 | + productA.parent().addClass('active') | |
| 497 | + var dataLink = productA.attr('data-imageoriginal') | |
| 498 | + var dataImg = productA.attr('data-image') | |
| 499 | + } | |
| 498 | 500 | |
| 499 | 501 | $('#pic').attr('src',dataImg) |
| 500 | 502 | $('#pic').parent().attr('href',dataLink) | ... | ... |