Page 1 of 1
Insert HTML Object
Posted: Mon Dec 06, 2021 4:04 pm
by mfirlotte
Hello everyone...
I'm adding some HTML and Javascript code for a mini-shopping cart by using the Insert HTML Object. So far, all is working as expected.
As the shopping cart expands in height as someone Adds to Cart, is there a way to dynamically grow/shrink the space occupied by the HTML Object?
Right now, I make it quite tall just in case, but when add only one or two items to the cart, it leaves a lot of white space before the footer appears.
Any ideas would be appreciated.
Thanks.
Re: Insert HTML Object
Posted: Mon Dec 06, 2021 4:38 pm
by crispy68
Hard to say without really knowing what code you've actually added.
Do you have a link to the page to see it in action? Is the html box for the cart inside anything (layer, layout grid, etc)?
Re: Insert HTML Object
Posted: Mon Dec 06, 2021 4:48 pm
by mfirlotte
Thanks Crispy68.
No..the HTML Object is not inside any containers or layers. It's free standing.
URL:
https://cuttingboards.firlottecreations ... MF001.html
At bottom of page, there is extra white space BUT when you click Add to Cart, that page (cart.html) has even more white space to accommodate several items. I'd like it to grow and shrink based on the amount of entries in the cart.
No worries, but if you continue on from there (no need), it goes to PayPal Sandbox.
Thanks.
Re: Insert HTML Object
Posted: Mon Dec 06, 2021 4:53 pm
by zinc
Sorry to butt in here but what shopping cart are you using for your site?
Re: Insert HTML Object
Posted: Mon Dec 06, 2021 5:06 pm
by mfirlotte
I'm following the demo I found here.
https://jquery-sessionstorage-cart.herokuapp.com/
I wrote another shopping cart in PHP but was unable to combine it into WYSIWYG properly so now I'm trying Javascript and jQuery. Integrates better and works pretty well except for the responsiveness and HTML Object sizing.
EDIT: Note that this is just a demo/mock-up from my "real" website that uses VibracartPro extension and backend. I trying different ideas as my hosting provider caused some issues with VibracartPro by disabling PHP curl() that is used. It took them 12 days to fix the issue but it's still not perfect so am looking at other ways.
Re: Insert HTML Object
Posted: Mon Dec 06, 2021 5:22 pm
by crispy68
It appears to me that the html object is set to: Use <div> to set position and size of the HTML.
With this setting, the width and height are set (fixed) and not responsive. You could add some CSS and to set the height of the html box to 'auto'.
Code: Select all
<style>
#Html1{height:auto;}
</style>
However, this will only allow your html box to expand. The footer and Secure image have fixed positioning down the page so there will still be white space unless you move them up.
The best way for this to work is to use a flexible layout (ex: layout grid). This will allow it to expand and push down the footer as needed.
Re: Insert HTML Object
Posted: Mon Dec 06, 2021 5:33 pm
by mfirlotte
Thanks Crispy68...I'll try these later today. Sounds promising.
Re: Insert HTML Object
Posted: Mon Dec 06, 2021 6:09 pm
by zinc
mfirlotte wrote: Mon Dec 06, 2021 5:06 pm
I'm following the demo I found here.
https://jquery-sessionstorage-cart.herokuapp.com/
I wrote another shopping cart in PHP but was unable to combine it into WYSIWYG properly so now I'm trying Javascript and jQuery. Integrates better and works pretty well except for the responsiveness and HTML Object sizing.
EDIT: Note that this is just a demo/mock-up from my "real" website that uses VibracartPro extension and backend. I trying different ideas as my hosting provider caused some issues with VibracartPro by disabling PHP curl() that is used. It took them 12 days to fix the issue but it's still not perfect so am looking at other ways.
Looks good! But I still love Pablo's easy to use approach to PayPal. Thanks Mitch!
Re: Insert HTML Object
Posted: Mon Dec 06, 2021 6:34 pm
by mfirlotte
No problem zinc.
Those work very well too as does VibracartPro. VibracartPro offers Discount Coupons which is great. However, I also want Gift Certificates so I wrote my own cart in PHP that offers all but am unable to combine it into my existing WYSIWYG site and I do not want to hand-code all my other pages.
So...that's why I'm playing around and running tests.
Re: Insert HTML Object
Posted: Mon Dec 06, 2021 7:33 pm
by zinc
Well-done!!!