News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Manufacturer Description @ 2.0.7 (a,b,c,d,e..)

Started by lipes, June 11, 2012, 02:14:45 AM

Previous topic - Next topic

lipes

It's possible to insert/add the Manufacturer Description text/image in the Manufacturer products browse page
(like we got the Mf name: http://forum.virtuemart.net/index.php?topic=102700.msg341694#msg341694 ) ?

I've already added a text in Administration > Manufacturer > Mf details 'Description'
( administrator/index.php?option=com_virtuemart&view=manufacturer&task=edit&virtuemart_manufacturer_id[]=1  )

but it isnt showing that text in the Manufacturer products browse page... :-/
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

lipes

Solved by BTP
is not yet implemented in test or stable versions.. but it's done by inserting the following code:
\components\com_virtuemart\views\category\view.html.php
      if (JRequest::getInt('virtuemart_manufacturer_id' ) and !empty($products[0])) $category->category_description =$products[0]->mf_desc ;

(some Moderator could remove this topic when he/she want)
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

lipes

#2
Quote from: lipes on June 12, 2012, 00:25:02 AM
Solved by BTP
is not yet implemented in test or stable versions.. but it's done by inserting the following code:
\components\com_virtuemart\views\category\view.html.php
      if (JRequest::getInt('virtuemart_manufacturer_id' ) and !empty($products[0])) $category->category_description =$products[0]->mf_desc ;

this funtion was not added in the 2.0.7 F.
Please add this in the Future because users Couldnt have the Manufacturer description in the Manufacturer Products Display Page...


We got the Manufacturer Title solved in the 2.0.7 D by BTPro here: http://forum.virtuemart.net/index.php?topic=102700.0
but we dont have the description yet.
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

Milbo

You are overwriting the category description with the manufacturer description. This is a solution for you, but not practicable for all. You can use the same line just add begin of your template. We may use it later optionable.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

lipes

#4
Yep.
I see that the Manufacturer Name was missing before in the Manufacturer page when the users go by the Mf module... so i requested that here: http://forum.virtuemart.net/index.php?topic=102700.0
and was added  May 21, 2012 in the same file category\view.html.php
// Override Category name when viewing manufacturers products !IMPORTANT AFTER page title.
if (JRequest::getInt('virtuemart_manufacturer_id' ) and !empty($products[0])) $category->category_name =$products[0]->mf_name ;


We are overwriting the category title with the manufacturer title. Correct? was a good fix!

So i requested that Mf description... by the same way that we got the Category Description too...
I know that we can see the Mf description in previous page (without override changes) when we click in the logo/text. But in the specific Manufacturer Page we cant see that description yet...
i just was thinking that this could be usefull.. just that! :)
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

Milbo

Quote from: lipes on June 18, 2012, 04:49:03 AM
We are overwriting the category title with the manufacturer title. Correct? was a good fix!

it is NOT a fix. It is a quickn dirty solution for your idea how it should be.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

lipes

ok... i'am not used to use/understand some web terms... and like some people say here "you'll have to give a discount" :)  because i dont understand the correct meaning of that and i was thinking that this was a fix for a problem that we got until that moment (I am not developer)  :-[

I only want to say that users who that have enabled the module manufacturer and want to see the products from any Manufacturer ... until that point we had No Manufacturer Title, or dont have any other information in the MF page....  only products without more info... (because in Manufacturer Page there are no category name or category description)..

With that "quickn dirty solution" all we could have now that Mf name

Please, i thank you! But it's not a "my idea"... I think that this it's a normal thing like a "suggestion" that we cant find in many online shop's and could/should be in VM.

Best Regards!
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

Milbo

It has not really a lot todo with programming. it is the same for a hourse or car. You created a solution which is for some people correct, but for others not. And from professional term you must not overwrite already existing content with another content, which is not described by the value name.

That means there should be an option, so that you can choose if it should be shown or not. And then there should be another variable, with the manufacturer description, and then there must be an if in the layout deciding what the user finally sees.

Therefore I wont add this fix, because it is too dirty, even when it fits the need of 70% of the users. It is breaking the standard patterns and lead fast to spaghetti code. It works for you, but not for developers which wanna extens virtuemart in the next years.

And when you one time start with that shit, it takes endless to correct errors like this.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

lipes

Sorry Milbo , but i am not overwriting the file yet. I was just kindly asking about if could be a solution to the Mf description...

I am using the VM 2.0.7 test versions ... and in the Original view.html.php test version file, around the line 152 / 153 already have that "dirty solution" code (without override)
Quote from: lipes on June 18, 2012, 04:49:03 AM
// Override Category name when viewing manufacturers products !IMPORTANT AFTER page title.
if (JRequest::getInt('virtuemart_manufacturer_id' ) and !empty($products[0])) $category->category_name =$products[0]->mf_name ;

Please Sorry !!! ...
Sometimes I do not know/understand if I'm helping (or not) by searching and saying here (in the VM Forum) what I've found.... and thinking what could be usefull to the VM community .. for 1% or 99% (then the selection priority is not with me... i am just trying to help too!)
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

Milbo

Hey Lipes,

this was not meant as a rant. No need to say sorry to me. I said of course is this a kind of fix for you, but it is not suiteable to the core.

U use the category view as a kind of manufacturer view, by just using a filter. This was intended todo it that way, infact I planned to add no manufacturer view and just todo it with filters as you do. But then others persuaded me to add an extra manufacturer view, because it is a difference if you filter a category for a manufacturer, which builds the intersection of this category and a manufacturer or if you want to see all products of a manufacturer.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

lipes

Positive! now i understand  :)
I was only concerned about we could insert that Manufacturer info... I thought that someone had forgotten about inserting this things, but's Ok! :)
i'll wait for a better tuned in some future next version.
Best Regards!
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25