Forum
Welcome, Guest

Product link loses category-id and flypage code
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Product link loses category-id and flypage code

Product link loses category-id and flypage code 2 years, 6 months ago #506

  • Carina
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
Hello,

I installed the module jproduct scroller and I am very happy with the visual appearance!
But unfortunately there are some strange errors that occur:

Some products lose their category-id when they are clicked on - the link behind the product simply does not contain the category information.
After some research I did not find any error in our database (this was the first place I thought I would find something going on) - also there are no rules for which product this error occurs!

To figure it out I temporarily activated the product scroller that is shipping with virtuemart - and here the category-id is added.

For my purpose the category-id is fundamental, because we change the template depending on the category-id.

Attached a link to the website I am referring to:

web5.confixx.customsite.de/index.php?option=com_content&view=article&id=23&Itemid=11

This category contains 6 products - the first product "Blaubeere Vanille" is a "healthy" one

The "Pfirsich Rosmarin" points to another category and is also a "healthy" one. (Just to show you the template-changing-mechanism)

All other products are corrupt - they all do not contain the category-id also the flypage-code seems to be wrong:

The correct code should look like this:
web5.confixx.customsite.de/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=14&category_id=5&option=com_virtuemart&Itemid=4

The corrupted code looks like this:
web5.confixx.customsite.de/index.php?page=shop.product_details&flypage=&product_id=37&category_id=&option=com_virtuemart&Itemid=4

I did not make any changes to the code of the module - can anybody please help me out?

There are about 20 products published so far.

I run joomla 1.5.14 with virtuemart 1.1.4 - and version number of the module is 1.1


Thanks a lot for your help....

Re:Product link loses category-id and flypage code 2 years, 6 months ago #507

  • jerry
  • OFFLINE
  • Moderator
  • Posts: 409
The way the category is determined is by using the category cross reference. That would be the vm_product_category_xref table. Check that and see if the entries are correct.

It uses the category to determine the flypage so when we get that straight everything should be fine.

Jerry

Re:Product link loses category-id and flypage code 2 years, 6 months ago #510

  • Carina
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
Thanks for your quick answer!

I already checked the vm_product_category_xref table. There is everything alright - as mentioned in my first post the standard product scroller available for virtuemart works just fine.
The "corrupted products" get their category-id and respective flypage.

What else can I do?
Looking forward for help and hints

Re:Product link loses category-id and flypage code 2 years, 6 months ago #511

  • Carina
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
Hello again,

finally I think I figured it out by myself.

In "mod_vm_jproduct_scroller.php" in line 119 it must look like this:

$query .= "' ORDER BY product_id";

At the moment there is just a:

$query .= "'";

Which means the productsArray isn`t sorted the right way.

That seems to cause the routine at line 196 and following to return the wrong result.

A further question:
Is the line 198 really necessary? I commented it out and it works fine.


In my case this solved my problem with the scroller.


Greetz!!!!

Re:Product link loses category-id and flypage code 2 years, 6 months ago #512

  • jerry
  • OFFLINE
  • Moderator
  • Posts: 409
I'm glad you got it working. It has not been an issue in any of the other installations, but your code makes sense.

Please clarify which line you are asking about when you say line 198, please (show the code).

Jerry

Re:Product link loses category-id and flypage code 1 year, 2 months ago #2352

I am struggling with something very similar. I have linked my products and categories in vm_product_category_xref, but the products dont appear on the website (in the categories).

When I check the product in VirtueMart it has no category associated with it, but if I select the category it should have, the product then appears on the site in that category.

The funny thing is the vm_product_category_xref table does not change; the entry for that product/category is the same!

Is there somewhere else this is saved in the database? Do I need to refresh/delete a cache?

Please help.

PS. I am using MS Access / obdc to edit the vm_category, vm_product and above mentioned tables.
  • Page:
  • 1
Moderators: jasper, nicholas, henry, jerry
Time to create page: 0.74 seconds

Login