Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boundingbox #28

Open
cvanbrummelen opened this issue Jul 19, 2024 · 6 comments
Open

Boundingbox #28

cvanbrummelen opened this issue Jul 19, 2024 · 6 comments

Comments

@cvanbrummelen
Copy link

Hello,

We are using a bit of customizating in our website to be able to use custom images and more information. This means we are creating our own JSON for PFD.
without-bounding.txt
with-bounding.txt

We want to use boundingboxes but are unable to get this to work. For some reason its not showing at all. Maybe we are missing something in our JSON but looking at the available information online we can not figure out what it is.

I have added 2 files to show what we did (we also tried multiple other things). Hopefuly somebody knows what we are missing.

@Peterbins
Copy link

I had the same. I use "usePrintingBoxAsBounding"

@Peterbins
Copy link

image

@cvanbrummelen
Copy link
Author

And $boundingbox is just another layer?

@Peterbins
Copy link

Peterbins commented Jul 19, 2024

This is the basic product json. Maybe it helps.

[
    {
        "category": "Product",
        "products": [
            [
                {
                    "title": "title1",
                    "thumbnail": "image.jpg",
                    "options": {
                        "printingBox": {
                            "left": 120,
                            "top": 460,
                            "width": 388,
                            "height": 145,
                            "visibility": true
                        },
                        "usePrintingBoxAsBounding": "yes",
                        "customAdds": {
                            "uploads": true,
                            "texts": true,
                            "designs": true
                        }
                    },
                    "elements": [
                        {
                            "type": "image",
                            "source": "image.jpg",
                            "title": " Title!",
                            "parameters": {
                                "left": 300,
                                "top": 320,
                                "removable": false,
                                "boundingBoxMode": "inside",
                                "price": 10.95,
                                "scale": 0.29400000000000004
                            }
                        }
                    ]
                }
            ]
        ]
    }
]

@cvanbrummelen
Copy link
Author

Getting somewhere with this! Thanks so much already.

Do you happen to know also how to invert it so the boundingbox is the spot where you can not have elements?
So everything is printable except the printingbox?

And does this also make it possible to have multiple boxes?

Last question, where did you get this information? Is there some nice documentation this is in I can browse through?

@Peterbins
Copy link

Peterbins commented Jul 22, 2024

i found this by looking at a few examples on the site (Fpd) and then parsing the json.

more than a bounding box, I don't know if this is possible

I definitely don't think invert works

default documention: https://jquerydoc.fancyproductdesigner.com/classes/Options.defaults.elementParameters.html#property_boundingBox

https://support.fancyproductdesigner.com/support/solutions/articles/5000548169-using-bounding-boxes-to-restrict-elements.

maybe option two is an option. I'm curious

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants