2.0.2 upgrade (then .3b) or fresh install with empty product_id in category view

Started by JaumeQuerS, March 12, 2012, 17:12:41 PM

Previous topic - Next topic

JaumeQuerS

Hi all,

After upgrading or fresh installing VM2.0.2 (J1.5) with sample data (oh... hand tools maintained... thanks!!) I get useless navigation: all references to a product (on modules, on category list, etc...) goes to 404 or frontpage.

To see where the problem was I tried ouputting product_id echo $product->product_name."<br/>".$product->virtuemart_product_id; in default.php of category but shows none and "0" !!

If I make a dump "print_r($product)" all is at "0" again!!

Can anyone help?

Thanks for advance!!




As I had a working 2.0 and made an upgrade to 2.0.2 I'm going to  expose how I do get here (today) as perhaps it can be usefull to someone  :o.


Yesterday I had a VM2 finished site ready and working: well done! Well, actually I know that was just testing... but all was done. As Child products (now said derivated?) is going to become necessary in the near future ... late yesterday I made a copy of my site and perfom a 2.0.2 upgrade.

My experiences about that has been:

- None of the work with Virtuemart has maintained. Specially "browse" and "flypage" (sorry for my old use of terms) has changed (in the good way) completelly. So let's start again.
- Calcs of taxes where specially incorrect (about 400%)

Advice: If you worked in 2.0 and need to upgrade t0 2.0.2, take it slowly... prepare yourselve to make again all the CSS, structure, and tpl again.  

But... (here comes my previously exposed problem )... category listing and links (f.e. in search) take to nowhere (often 404). Strange...

As nothing worked and I know I have to restart with all templates (cart, category, categories, product_details, etc...) and all my product list would be replaced (as we need some new features as Child products with stock)... I thought "better start again" and made a fresh reinstall (Joomla 1.5 & VM2.0.2).

OK... the problem is that it didn't worked. Hand tools listing (or any other category) shows a nosense listing. No image (thumb), no title, no link: nothing worked. If I output $product->product_id it says "0".... and you know the rest.

PRO

Quote from: crealogica on March 12, 2012, 17:12:41 PM


My experiences about that has been:

- None of the work with Virtuemart has maintained. Specially "browse" and "flypage" (sorry for my old use of terms) has changed (in the good way) completelly. So let's start again.
- Calcs of taxes where specially incorrect (about 400%)

Advice: If you worked in 2.0 and need to upgrade t0 2.0.2, take it slowly... prepare yourselve to make again all the CSS, structure, and tpl again.  


ITS BECAUSE YOU ARE SUPPOSED TO DO A TEMPLATE OVERRIDE, NOT EDIT THE ORIGINAL FILE
http://forum.virtuemart.net/index.php?topic=90935.0


AND: do you have sef turned on?

I do not get the 404 errors you are talking about

JaumeQuerS

Quote from: BanquetTables.pro on March 12, 2012, 18:17:39 PM
Quote from: crealogica on March 12, 2012, 17:12:41 PM


My experiences about that has been:

- None of the work with Virtuemart has maintained. Specially "browse" and "flypage" (sorry for my old use of terms) has changed (in the good way) completelly. So let's start again.
- Calcs of taxes where specially incorrect (about 400%)

Advice: If you worked in 2.0 and need to upgrade t0 2.0.2, take it slowly... prepare yourselve to make again all the CSS, structure, and tpl again.  


>ITS BECAUSE YOU ARE SUPPOSED TO DO A TEMPLATE OVERRIDE, NOT EDIT THE ORIGINAL FILE
>http://forum.virtuemart.net/index.php?topic=90935.0

>AND: do you have sef turned on? Also tried with.

Disabled? Yes, it's.

>I do not get the 404 errors you are talking about

You're completely right. Thanks for the advice... was my completely fault ! But anyway, even if you use template override you must attend the programming changes, isn't? So, actually you'll need to restart your job ... for example you had productdetails/default.php and now you have 7 tpls for it. So you have to rewrite it all. Or Am I wrong? If I am not wrong it's a good advice "take it easy", isn't?.

Refering at the problem with product listing I attach an image to show how products are "orphans". The 0 you can see is the "echo $product->virtuemart_product_id" inside "foreach( ...  as $product)"

I'm sure it's a ridicolous thing I have not noticed because none of all you has this problem. Any help will be fantastic.

Thanks again

PD: SEO disabled... but tried enabling it also.

[attachment cleanup by admin]

PRO

i do not get that problem, and have not seen it with product id.

TRY
http://forum.virtuemart.net/index.php?topic=99047.0

^^ that version. INSTALL through the installer, and DO NOT uninstall first.

the separate template probably came out a month ago. YOU will be a lot happier with them. It makes customizing much easier.

AND:; what you do to convert your template over.

TAKE the div you had something in.
For example the "images"

<div style='my special customized style">
Images code etc.
</div>


THEN: you can take all of that code, and place it in the images template.

and echo the template like this

<?php echo $this->loadTemplate('images');?>




MAKE sure to backup the files first.

JaumeQuerS

Hi again BanquetTables.pro,

I actually LOVE the new template distribution. It's essential and perfectly understand the need.

We're already working as you expose (moving structure from one to other tpl). As I said "teake it easy", as you said "YOU will be a lot happier with them".

Refering to my problem, I applied the .3b and nothing happened. I installed a clean 1.5 again and .3b and again... I can't believe it... now I'm going to upgrade again from 2.0 . Perhaps I missed something.

If anyone has any idea about where's the problem, it will be welcome...

Thanks...


JaumeQuerS

Making some searches I found http://forum.virtuemart.net/index.php?topic=96592.0 ... if you are here looking for a solution, perhaps your solution is on this link.

None of that worked for me  :-\

JaumeQuerS

The suprisest thing : in /templates/beez/html/com_virtuemart/category/default.php there is


// Count products
$BrowseTotalProducts = 0;
foreach ( $this->products as $product ) {
   $BrowseTotalProducts ++;
}


and I say to myself "allright start from the beginning"


// Count products
$BrowseTotalProducts = 0;
foreach ( $this->products as $product ) {
   echo $product->virtuemart_product_id."<br/>".$product->product_name;
   $BrowseTotalProducts ++;
}
echo $BrowseTotalProducts;


And Output is

0
0
0
3


How's possible that foreach is made 3 times (OK!) but no data is in it?

Any idea?? I'm really stucked !!


PRO

Thinks to check

"shopper groups" assigned to products
Language "is multilanguage enabled"
Product sort order "what is it set to"?

ALSO: why instal a clean J1.5? You should use 2.5.2 if you are starting clean.

JaumeQuerS

Hi again, I think you deserve a dinner when you come to Barcelona...  :) Ill feed as I'm not alone with it :o !!

- I've played a lot with shopper groups (assign, deassign, eliminate, compare tables from a functional 2.0 respect no-functional 2.0.3)... nops
- Language is enabled and Spanish used (tables sufixed "_es" are full of data)... Tried eliminate all, etc... It's my own server and I create, duplicate, restore, backup, etc... as I need so I tried all.
- Product Name, Product Category. Tried Product_id, product_Sku, etc... If I try some of them in Default category sort order it fails

ALSO:: Why not 2.5??? good question... we are a little bit slow respect changes. VM2.0 ok, we need new functionality but 2 changes at the same time its complicated. Why? We're 9 people here (changes involve many things) and we're not actually young  :-\ ... AND prudence comes with the age.  Moreover, things were'nt so clear 3 months ago when we startes the project.

BUT, once operative the first J1.5+VM2.0 , last week we started different options (as we need to upgrade and failed):

J1.5 --> migration and fresh instalation of VM2.0 and VM2.0.3, based on VM2.0 or VM1.1.9
J2.5.2 --> fresh install and migration from J1.5  --> VM2.0 and then upgrade (this last one it's gaining strength I think this is the way, as you also say)

I'll try to explain (in my Sioux english) what happened once all is working - if this provides some usefull information to anyone - but this is taken me too long and my Schedule is completely out of prevision.

If you or other one have some other suggest to try to rescue my broken upgrade from  J.5+VM2.0 --> to VM2.0.3 it will be great...

Thanks again and always...



Milbo

You need for the migration of vm1 to vm2 only the old vm_ tables. When you want to work with your vm2 stuff, then use a fresh 2.5, install the vm2 tables and install the latest vm2 on it.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

JaumeQuerS

Thanks Milbo,

We're making it in that way. The initial idea as a test we were making is take a fisnished website IN 1.5 + V2.0 AND MIGRATE TO a 1.5 + 2.0.2  ... but it seems something were wrong with the 2.0 or the process we followed. After many try we decided start over.

So, now we're working on a fresh 2.5 and 2.0.2 install. Adapting all /template/xxx/com_virtuemart views to 2.0.2 !! and joomla's 1.5 template to 2.5

Thanks to all !!