| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Flexy conditional statements | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() As part of making the thumbnails larger and responsive I want to remove the fixed height and width parts of the generated image tag.
I've done this... Code:
but it seems a bit hacky and produces bad mark up in the cache... Code:
It does however work and produce the correct HTML. Could I improve it?
__________________
Core version: 5.5.xx |
|||||||
#2
|
|||||||||
|
|||||||||
![]() Hello @xgarb
You can create a method that will take two params (name, value) and incorporate this logic into it: Code:
so it would look as follows: Code:
Hopefully, it helps. Tony
__________________
Found a bug in X-Cart? Post it to our bug tracker! Know how to make X-Cart better? Suggest an idea! |
|||||||||
#3
|
|||||||||
|
|||||||||
![]() I think the better way would be extending the getProperties() method and removing/adding tag properties from there as follows (I used Custom Skin as the module for implementing the change, you can use your custom module):
PHP Code:
As you don't replace the template file, this method would be more future proof (compatible with future upgrades).
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful ![]() Click here to learn how to apply patches X-Cart Extensions |
|||||||||
#4
|
|||||||||
|
|||||||||
![]() Quote:
This won't make the images responsive, but will resize them without keeping the aspect rate. The styles should be either "width:100%; height: auto", or "height:100%;width:auto".
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful ![]() Click here to learn how to apply patches X-Cart Extensions |
|||||||||
|
|||
X-Cart forums © 2001-2020
|