VirtueMart Forum

VirtueMart 2 + 3 + 4 => Security (https) / Performance / SEO, SEF, URLs => Topic started by: ereallstaff on February 14, 2017, 15:55:49 PM

Title: Enshort product url
Post by: ereallstaff on February 14, 2017, 15:55:49 PM
Hello we are on virtuemart 2 and joomla 2.5 ( still ? yes . Too many problems to think about a migration soon )

I want to know if there is any standard setting to enshort the url of product like this:

www.modacalcio.it/_lang_/_product_slug.html

i have many things ( like "virtuemart" , "shop" , various category name )  in the middle I really don't need

thank you
Title: Re: Enshort product url
Post by: jjk on February 14, 2017, 19:16:05 PM
In latest VM 3.0.19.x versions you would have an option in VM configuration to shorten the urls by omitting the categories. But of course that would require an update.  ;)
Title: Re: Enshort product url
Post by: ereallstaff on February 16, 2017, 09:46:11 AM
Thanks . is there any simple api access or webservice for VM 3 in Joomla 3?
Title: Re: Enshort product url
Post by: jjk on February 16, 2017, 11:29:51 AM
Quote from: ereallstaff on February 16, 2017, 09:46:11 AM
Thanks . is there any simple api access or webservice for VM 3 in Joomla 3?
Are you looking for something like these?
http://www.virtuemart-datamanager.com/index.php?option=com_virtuemart&page=shop.browse&category_id=21&Itemid=29&vmcchk=1&Itemid=29 (http://www.virtuemart-datamanager.com/index.php?option=com_virtuemart&page=shop.browse&category_id=21&Itemid=29&vmcchk=1&Itemid=29)
http://shop.ekerner.com/index.php/component/vm_api/ (http://shop.ekerner.com/index.php/component/vm_api/)
Don't know with which VM versions the above are compatible.
Title: Re: Enshort product url
Post by: ereallstaff on February 16, 2017, 17:58:46 PM
the first maybe yes, the second is only to get info ( I need to push )

Unfortunately the real problem, is that virtuemart has many limits , sometimes seems really not built for ecommerce, cache problem over all  . Then also problem with joomla, and you're on
Title: Re: Enshort product url
Post by: jjk on February 16, 2017, 21:16:48 PM
Quote from: ereallstaff on February 16, 2017, 17:58:46 PM
Unfortunately the real problem, is that virtuemart has many limits , sometimes seems really not built for ecommerce, cache problem over all  . Then also problem with joomla, and you're on

It is much more flexible and also scales better than most other shop systems if your shop grows. Your shop is not big and if you have problems, I would suggest to invest some time into an update to the latest versions of Joomla and VirtueMart. That would give you the opportunity to get rid of unnecessary stuff like for example K2 and mootools. Also there are templates with better performance and design.

One source of problems you might encounter probably is that you load two different versions of jquery from Google.
Title: Re: Enshort product url
Post by: jenkinhill on February 17, 2017, 00:12:24 AM
I agree with jjk. VirtueMart 3 is very different from VM2, which at times was a bag of nails. It is now very powerful,  flexible and bult for purpose. Yes it gets dragged down by the shortcomings of Joomla, but to hold back on updating because of current problems is the wrong thinking.  Last year I updated an old J2.5/VM2 site for a client who told me that he could not believe that VM3 was so capable without all the hacks and extensions that he thought were essential. Suck it and see.
Title: Re: Enshort product url
Post by: ereallstaff on February 20, 2017, 17:53:12 PM
You know and can see I use virtuemart since very old version, and I trust you but men there are things I really can't understand.

Latest one is that on my actual modacalcio, many customers says they see always cart empty . The cache is a real big hassle , and I hope there is something better than jotcache ( native ?! ) for newer version .

I will plan to take a look
Title: Re: Enshort product url
Post by: Studio 42 on February 20, 2017, 21:11:32 PM
àereallstaff : i agree with you for some cache problem, because VM always cache categories and if you use an api and this do not clear the categories cache then your shop is not synchronised.
But the user can clear the cache in this case, you have some admin tools to clear it.
So the problem is most time external tools that do not handle this. Using cache is most time better if you know that it's a complex task and if the API code is right, he can clear the cache as VM do on updating something.
Title: Re: Enshort product url
Post by: Milbo on February 22, 2017, 22:19:16 PM
and Studi42, I found now the reason, why the caches got not cleaned correctly automatically. Joomla gives you per JFactory always the cache of the application. So I just replaced now all "getCache" by an own function (will be moved to vFactory, therefore already set to deprecated), so we use always the frontend cache folder.

Quote from: ereallstaff on February 16, 2017, 17:58:46 PM
the first maybe yes, the second is only to get info ( I need to push )
For pushing you need your own plugin or component. A push API is very likely to be unsecure. With a simple written plugin, using the VM infrastructure it is more safe to write a special task for your special purpose.

Quote from: ereallstaff on February 16, 2017, 17:58:46 PM
Unfortunately the real problem, is that virtuemart has many limits , sometimes seems really not built for ecommerce, cache problem over all  . Then also problem with joomla, and you're on
The only "problem" is joomla. VM3 is much more scaleable than vm2. It works with a lot different type of caches. I think your main problem with vm2 were external 3rd party caching plugins. Vm3 is mainly cached by itself. It is a lot faster than vm2. It reduces the queries a lot, has a lot more db keys, and caches internal any bigger object (categories, products, manufacturer, vendor, cart, etc). The cart uses with 1 product around 40% less memory, when you have 50 products in the cart, then you notice the difference (vm2 was not able to handle that, almost any server just died). Takes maybe 10% of the memory (with 50 products), than before.

We also use on our demo store an nginx, which works with reverse proxy. It is very fast and there are no errors. We will use with our own store a CDN in future, so we will also solve any problems there.

The new version uses also a lot more ajax, in the FE (category browse, cart) and BE. And almost any entity has a language fallback now.

The future is a system, which works on Drupal, Joomla and WP :-)
Title: Re: Enshort product url
Post by: Studio 42 on February 22, 2017, 23:58:25 PM
Max,
about CDN, you should change the problem that you cannot use external URL for image and thumb, this is a very common request (especially for big compagnies) and i think only some line change should give the possibility to use external URLs.
So you can use CDN or any external server for static files.
Title: Re: Enshort product url
Post by: Milbo on February 23, 2017, 09:16:21 AM
You can use external urls. Imho only per db entry, but when you have a correct entry, it should work
Title: Re: Enshort product url
Post by: Studio 42 on February 23, 2017, 12:23:17 PM
Quote from: Milbo on February 23, 2017, 09:16:21 AM
You can use external urls. Imho only per db entry, but when you have a correct entry, it should work
Last time i tried, i had problem with thumbnails and you cannot disable it if you need to mix external link and from server.
Title: Re: Enshort product url
Post by: ereallstaff on February 24, 2017, 07:41:44 AM
Have checked templare clubs also I didn't see one template working fine. Hope they can improve

About people that can't see product in their cart, any reason?

I am having 1-2 people per day blaming ( that means 2-300 letting website without ask )

And the strange thing , is also that they have same problem from smartphone
Title: Re: Enshort product url
Post by: Studio 42 on February 24, 2017, 11:43:40 AM
For the cart :
Deactivating the cache can solve your issue because if you use page cache this cache all page including cart.
Another solution is to change Joomla cache type. Try to switch from conservative to progressive.
Another problem can be that your server cache the cart page, if you use .htaccess with expiration time for html/txt or by extension .php or external cache system.
Title: Re: Enshort product url
Post by: ereallstaff on February 24, 2017, 16:49:36 PM
Quote from: Studio 42 on February 24, 2017, 11:43:40 AM
For the cart :
Deactivating the cache can solve your issue because if you use page cache this cache all page including cart.

I use jotcache , excluding page=shop.cart,page=checkout.index,pop=1,view=cart    .    I have also sh404sef , maybe this can cause caching? ( I had same problem before installing sh404sef

Quote from: Studio 42 on February 24, 2017, 11:43:40 AM
Another solution is to change Joomla cache type. Try to switch from conservative to progressive.

Joomla cache set to off to use jot

Quote from: Studio 42 on February 24, 2017, 11:43:40 AM
Another problem can be that your server cache the cart page, if you use .htaccess with expiration time for html/txt or by extension .php or external cache system.

this could be , but why access the cart as a blank page? could have more sense, that after adding first product , the cart page is cached and you see always one product and not more than one.

and also why this affect just a part of customers?

These are big problems about virtuemart


Title: Re: Enshort product url
Post by: Studio 42 on February 24, 2017, 17:03:06 PM
I think , it's not VIrtuemart related.
Problem is that cart need to be displayed by user and always refresh on each change. All other Joomla page can use cache without issue.
So if you use any type of cache and this cache the cart then you get problems. This can be browser cache, joomla cache or any other caching system.
Check that the expire time for cart is always set to an old date eg in your document :
Cache-Control: no-store, no-cache, must-revalidate, max-age=0
But perhaps this should be done by Virtuemart to be sure it's not cached in the server ?

A PHP sample is
    header("Expires: Tue, 03 Jul 2001 06:00:00 GMT");
    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
    header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
    header("Cache-Control: post-check=0, pre-check=0", false);
    header("Pragma: no-cache");
But need to be set Joomla way is better.
If some code developper read this post, i hink this should be in the VM core code, to be sure cart get not cached by browser.
Title: Re: Enshort product url
Post by: jenkinhill on February 24, 2017, 17:25:50 PM
@ereallstaff

Quote from: ereallstaff on February 14, 2017, 15:55:49 PM
Hello we are on virtuemart 2 and joomla 2.5

Does this still apply?  J3.5/VM3.0.18+  does not need Jotcache or SH404
Title: Re: Enshort product url
Post by: ereallstaff on February 24, 2017, 18:27:37 PM
Quote from: jenkinhill on February 24, 2017, 17:25:50 PM
@ereallstaff

Quote from: ereallstaff on February 14, 2017, 15:55:49 PM
Hello we are on virtuemart 2 and joomla 2.5

we wrote just 2-3 days ago, I am not so fast to pass already to other system .I either didn't find a good template for it

Does this still apply?  J3.5/VM3.0.18+  does not need Jotcache or SH404
Title: Re: Enshort product url
Post by: jenkinhill on February 24, 2017, 18:43:34 PM
I am wondering if some of the advise above is more relevant to VM3 than to VM2.

I agree that there were some problems in the use of VM2.x but there has been so much progress since then. At least you have been thinking of upgrading. As for templates, these are very much a personal thing, and the usual template clubs go more for flash over function. My choice for VM sites are templates from https://www.olympianthemes.com  The developer is a member of the VM team so they are thoroughly tested and kept up to date.
Title: Re: Enshort product url
Post by: ereallstaff on February 24, 2017, 19:00:24 PM
I had seen horne 3 and effectively worths a trial.

problem I think that template should already think about 2 fixed places below for filters with custom filters and cart , and for this I will need to work a lot

Anyway thank you
Title: Re: Enshort product url
Post by: ereallstaff on February 24, 2017, 19:23:28 PM
once we are here: is there a way to bootstrap virtuemart 2 to write a fast script to load products using the same structure?
Title: Re: Enshort product url
Post by: Milbo on February 25, 2017, 08:38:23 AM
Quote from: Studio 42 on February 24, 2017, 11:43:40 AM
Try to switch from conservative to progressive.
That is just slow. It means cache per user. That means any first page load is slow and uncached.

Quote from: Studio 42 on February 24, 2017, 11:43:40 AM
Another problem can be that your server cache the cart page, if you use .htaccess with expiration time for html/txt or by extension .php or external cache system.
yeh, I think the problem is here.
Title: Re: Enshort product url
Post by: Milbo on February 25, 2017, 08:41:28 AM
Quote from: ereallstaff on February 24, 2017, 16:49:36 PM
Quote from: Studio 42 on February 24, 2017, 11:43:40 AM
For the cart :
Deactivating the cache can solve your issue because if you use page cache this cache all page including cart.

I use jotcache , excluding page=shop.cart,page=checkout.index,pop=1,view=cart    .    I have also sh404sef , maybe this can cause caching? ( I had same problem before installing sh404sef
shop.cart is vm 1 !!! So you do NOT exclude the cart!


Quote from: ereallstaff on February 24, 2017, 16:49:36 PM
These are big problems about virtuemart
This is not a VM problem. You use jotacache.

Maybe your problem is SSL related. Use SSL for the whole shop, not just the sensitive areas.
Title: Re: Enshort product url
Post by: ereallstaff on February 25, 2017, 11:08:01 AM
Quote from: Milbo on February 25, 2017, 08:41:28 AM
shop.cart is vm 1 !!! So you do NOT exclude the cart!

I reduced only to view=cart , let's try

Quote from: Milbo on February 25, 2017, 08:41:28 AM
Maybe your problem is SSL related. Use SSL for the whole shop, not just the sensitive areas.

I use it for entire site already
Title: Re: Enshort product url
Post by: ereallstaff on February 25, 2017, 14:27:20 PM
Multi variant creation has a bug : doesn't work if debug mode is on ( on development was my value )

This was due to print
Notice: Undefined variable: i in ....../administrator/components/com_virtuemart/models/customfields.php on line 605

if you want to work with json, friend, you need to silence all notice and error before printing or manage to print under the response array.

took 1 hour to understand, but a newbie won't had set this properly at all

Title: Re: Enshort product url
Post by: Milbo on February 26, 2017, 08:11:43 AM
Quote from: ereallstaff on February 25, 2017, 14:27:20 PM
Multi variant creation has a bug : doesn't work if debug mode is on ( on development was my value )
.....
if you want to work with json, friend, you need to silence all notice and error before printing or manage to print under the response array.

When you enable a debug, json is most likely to break, if there is a debug in the json. It is inevitable.
Quote from: ereallstaff on February 25, 2017, 14:27:20 PM
you need to silence all notice and error before printing
Yes, you have todo that. But not "we". Else you had no chance to debug it. There is an old rule saying. Better a red light in the cart telling that there is (will be) a problem, instead of just having a problem.
Title: Re: Enshort product url
Post by: ereallstaff on February 26, 2017, 10:06:27 AM
Yes but you can manage things Luke I say adding to response the errors and print elseway without breaking the code

This way you don t have red message like you say and newbies goes mad :(