X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Third Party Add-Ons for X-Cart 4 (https://forum.x-cart.com/forumdisplay.php?f=45)
-   -   X-Cart reBOOT (reDUX) Template (https://forum.x-cart.com/showthread.php?t=77655)

Dougrun 06-30-2021 03:03 PM

Re: X-Cart reBOOT (reDUX) Template
 
even though the page timed out and gave me a 404 error, the webp generator evidently did them all and ...
198531.25 GB361.98 MB922.78 MB -72%

PhilJ 07-01-2021 01:12 AM

Re: X-Cart reBOOT (reDUX) Template
 
Quote:

Originally Posted by Dougrun
A cool add-on for this would be a tool that removes images on discontinued/disabled products. I know xc4 doesn't like deleting products outright, it creates database integrity issues. We have 5208 products and add about 50/yr.


Hi Doug, I've just added a 'Cleanup Image Folders' button to the WEBP generator, which deletes any 'old' images from the file system that don't exist in the DB image tables. It's quite a handy little utility on it's own, especially if you have an old store.

Tested and works fine, but as a precaution before your first run, I'd make a backup of your /images/ folder.

Get the latest files and re-upload /images/webp/index.php

To delete images on disabled products, you'll need a separate script for that. You can try this ... untested, but should work in theory. The file should go in /admin.

The WEBP generator may struggle on super-large images, so if you get any problems, maybe check the source image file sizes first.

It has only snagged up on me once, which was due to some detailed images being gigantic (4000px +).

Or you can try increasing the memory_limit value...
Code:

ini_set('memory_limit', '128M');

PhilJ 07-01-2021 10:35 AM

Re: X-Cart reBOOT (reDUX) Template
 
Just a tip, if you want to iframe something quickly, like a support app, that resizes automatically, you can add code like this to a static page or wherever...
Code:

<iframe class="w-100 border-0" id="myIFrame" name="myIFrame" src="./path/to/your/app" onload="updateIframe()" scrolling="no"></iframe>
<script src="{$AltSkinDir}/js/plugins/iframe/dynifs.min.js"></script>
<script>
function updateIframe() {
  DYNIFS.resize('myIFrame');
}
setInterval(updateIframe, 500);
</script>

You can see a demo here.

nauticalstyle 07-05-2021 09:05 PM

Re: X-Cart reBOOT (reDUX) Template
 
Quote:

Originally Posted by PhilJ
@nauticalstyle, you can include that widget anywhere with the following Smarty code...
Code:

{include file="custom/widgets/widget_category_grid.tpl" title=$lng.lbl_categories align="center"}
Or, explain in a bit more detail what you want to achieve...



Thanks Phil,
You say the simple category grid widget can be included "anywhere" with that code. Like when it's included in a home_style_X.tpl (reference your post from June 17). The result is similar to the categories grid displayed when I hover over the (Combo menu) Categories menu. The difference being the widget produces a four column display and the mouseover produces a a six column display (without the Categories title).


So, getting back to your post of June 17, wherein you attached the modified promo_hero.tpl and provided a link to the latest minor update, which included the new categories grid widget, I didn't understand what the modified promo_hero.tpl was supposed to do or how to test it ("only on mobiles").


It's the (Combo menu) Categories mouseover event that I'm interested in. How is that mouseover event captured and how is the code that produces the categories grid launched? Is it in Smarty, JS, or both? If I can understand that, I was thinking I could use the same code to display the Categories grid when a mouseover event occurs on a Slider Image link or a Hero Image link.


How does does promo_hero.tpl and the categories grid widget play a role in this?

PhilJ 07-05-2021 11:30 PM

Re: X-Cart reBOOT (reDUX) Template
 
By the sounds of it you want some sort of mouseover effect adding to the combo menu dropdown, but so far it's vague...

Maybe put a screenshot/mockup together of what you want to achieve and I can suggest a solution for you / create you a custom widget...

Navigation hover effects usually require some extra CSS and/or JS code.

There are some promo widgets already built-in, but you do need at least basic coding knowledge to use them. Examples.

nauticalstyle 07-06-2021 04:09 AM

Re: X-Cart reBOOT (reDUX) Template
 
Quote:

Originally Posted by PhilJ
By the sounds of it you want some sort of mouseover effect adding to the combo menu dropdown, but so far it's vague...

Maybe put a screenshot/mockup together of what you want to achieve and I can suggest a solution for you / create you a custom widget...

Navigation hover effects usually require some extra CSS and/or JS code.

There are some promo widgets already built-in, but you do need at least basic coding knowledge to use them. Examples.



Sorry Phil, I'm making it sound more complicated than it needs to be.
If I use your Demo as an example, hovering over "Home & Garden" on the header menu displays a categories grid.
I was thinking this Categories grid could be displayed when hovering over the Slide's "Shop Now" button (or, alternatively, a Hero promo link button). But on second thoughts it may not be a good idea :???:

PhilJ 07-06-2021 10:02 PM

Re: X-Cart reBOOT (reDUX) Template
 
I see see what you mean, but it would need a fair bit of tinkering to the homepage slider code for that functionality, and probably won't add much value to the UI.

With Bootstrap and Flickity, there's scope to add category carousels and even category modals - I can build you any kind of custom widget / promo section... just need a basic mockup design of what you need.

Dougrun 07-19-2021 12:56 PM

Re: X-Cart reBOOT (reDUX) Template
 
I think the webp image tool is great, but i think it needs more logic. For example, if i convert all my images and enable it in the settings. they show ok, but when I go to add an item and upload a webp image directly, that image wont show. (because its looking for it in the images/webp folder, not the D folder). And since it doesnt convert/copy webp to webp folder, i would have to save/upload it as a jpg then convert them all again.

Would also like to see support for webm movies. like this nike page has..

https://www.nike.com/t/react-infinity-run-flyknit-2-womens-running-shoe-rfh6Z8/CT2423-005

PhilJ 07-20-2021 11:01 PM

Re: X-Cart reBOOT (reDUX) Template
 
@Doug, I'll see what I can do to improve the WEBP generator this week.

Bizarrely, the Nike store is not far off the new template I'm currently working on.

PhilJ 07-23-2021 06:02 AM

Re: X-Cart reBOOT (reDUX) Template
 
@Doug, ok the WEBP image generator has been improved.

- You can now generate and delete WEBP images on an image-type basis.
- The 'Update WEBP Images' button should now do its job properly... it'll generate only the necessary images that haven't already been converted to WEBP.

You shouldn't need to manually upload any WEBP images ... the generator should do all the work for you.

Get the latest zip via your order invoice and replace /images/webp/index.php

Hope that helps, let me know how you get on.

I've added some general info about the WEBP generator here.


All times are GMT -8. The time now is 09:22 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.