Jump to content

HTML5 Data parameters issue (HTML 5 data-* attribute) - Solved


Recommended Posts

Hi Guys,

 

Been building a new module to hook into the product pages, to give the customer the ability to customise the set products.  I.e. add text, add exisiting images with the ability drag and drop etc (I know their is existing modules but I need something different also)

 

All was going well, got the module setup, hooked it into place and now have came up against something, for e.g. using "data-parameters='{"x": 210, "y": 200, "colors": "#000000", "removable": true, "draggable": true, "rotatable": true, "resizable": true, "scale": 0.25, "price": 7, "boundingBox": "Base", "autoCenter": true}'"

 

so using it on a <img> for e.g. <img src="<localhost>../tee-shirt/basic1.png" title="Base" data-parameters='{"x": 214, "y": 232, "colors": "#f1f1f1, #111111, #eeeeee", "price": 12}' />

 

I get a white screen, my hook is attached only on the product.tpl file, so white screening all the product pages.  Has anybody else came up against this? If so i'd be greateful for some feedback.

 

I've probably missed something obvious and hopefully just need it pointed out :)

 

Cheers,

 

Joe

Edited by JJSmyth (see edit history)
Link to comment
Share on other sites

Hi Guys,

 

Friendly wee bump.  I've added a screenshot of my progress, as you can see I have the module in place on the product pages, where I pickup the pages product image but with not being able to add "data-parameters='{"x": 214, "y": 232, "colors": "#f1f1f1, #111111, #eeeeee", "price": 12}'" to my <img>s its setting the image in the canvas out of positon and I cant drag and drop so currently holding up my progression.

 

I have it working outside of PrestaShop without issue but when I add the data-parameters tag, it's just white screens on me.  I am going through everything in hope of picking out the issue but am hoping someone has solved it before and could advise?

 

Thanks,

 

Joe

Link to comment
Share on other sites

×
×
  • Create New...