Forums / All Other Contributions/Addons / I fiddled with the mod: Restructured Add Product Page for Admin v1.02

I fiddled with the mod: Restructured Add Product Page for Admin v1.02

Locked

Views: 705

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
24 May 2010, 4:53 PM
#1
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

I fiddled with the mod: Restructured Add Product Page for Admin v1.02

I made some changes to a this great mod by OZeTrade.

I'm posting my changes for three reasons. First, if anybody wants to use it they can. Second, hoping somebody will double check my work. Third, most important, I am about to make a REALLY big change and I'm hoping somebody will offer advice.

This mod had been redone for 139a, so I first had to merge a change from 139c. It is only one file and one line within, so it was super easy.

Then I made a number of other changes...

  • Moved to bottom: Product URL and Date Available
  • Brought to top: Products Price (Net)
  • Changed width: from 100% to 900px
  • Changed text of labels

The items I moved to the bottom are things I expect to rarely (if ever) use. I moved the single Price element to the top because I pretty much always use it.

With things arranged as I now have it, I can pretty much ignore everything after Product Image, the DEFAULT values will be good for 99.9% of my products.

I changed the width to make the Prod Page easier to read on large screen monitors. If you use large monitors (as I do), then the descriptions (such as Price, etc) are several inches away from the inputs. This just brings it all in tighter.

That said, I guess I'm done with changing/rearranging appearance. Personally I believe that even these changes leave much to be desired as a GUI.

SO NOW FOR THE REALLY BIG CHANGE:
I include meta tags for all of my products. When I manually build meta info, I like to copy and paste directly from my product description.

So today I will be attempting to move meta input onto the product page. Essentially, I will merge code from this file:
/admin/includes/modules/product/collect_info_metatags.php
~into this file:
/admin/includes/modules/product/collect_info.php

Can somebody tell me if this is a bad idea? And if it is, why?

24 May 2010, 5:04 PM
#2
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

Re: I fiddled with the mod: Restructured Add Product Page for Admin v1.02

OZeTrade's mod is just a revision of a single file:
/admin/includes/modules/product/collect_info.php

Here is my version:

dang! code is too long... how to attach?

I guess I have to attach as link?

Try this:
https://www.hospitalbedstore.com/restructured.zip

24 May 2010, 5:40 PM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: I fiddled with the mod: Restructured Add Product Page for Admin v1.02

Feznizzle:

When I manually build meta info, I like to copy and paste directly from my product description.Zen Cart automatically does that if you leave the meta description blank.
Feznizzle:

So today I will be attempting to move meta input onto the product page. Essentially, I will merge code from this file:
/admin/includes/modules/product/collect_info_metatags.php
~into this file:
/admin/includes/modules/product/collect_info.php

Can somebody tell me if this is a bad idea? And if it is, why?
Bad idea ... because doing so means you also need to merge all the logic from the preview and update scripts as well.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

24 May 2010, 6:08 PM
#4
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

Re: I fiddled with the mod: Restructured Add Product Page for Admin v1.02

Hi DrByte, thanks for offering your thoughts.

Yes, I love that ZC automatically inserts meta info. For thousands of products I will put up, this will be sufficient. However, a human eye is much better and, in many cases, necessary.

When I copy/paste manually, I am selective about what I choose to insert where the automated system just scoops up the first info it finds. I may copy/paste the basics, but then I modify everything for maximum impact. Especially when it comes to high dollar products.

The biggest weakness to the automation is Key Words! This truly must be hand done.

You said:

Bad idea ... because doing so means you also need to merge all the logic from the preview and update scripts as well.

Bummer, that is what I was worried about. I guess that puts this outside the ability of my very limited skill set.

I also want to incorporate the Meta Tag Character Limiter.

But that mod needs to be updated to observe file changes in 139c. before it can be used.

sigh

I really want this. Maybe I'll go post it on scriptlance or something.

24 May 2010, 6:53 PM
#5
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

Re: I fiddled with the mod: Restructured Add Product Page for Admin v1.02

DrByte,

It occurred to me that I don't need a fancy java mod in order to limit the number of characters I can insert. I should be able to do something like this:

<input name="textfield2" type="text" maxlength="55" />

Can I insert limits here?

<tr> <td class="main"valign="top"><?php echo TEXT_META_TAGS_TITLE; ?> </td> <td class="main"> <?php echo zen_draw_input_field('metatags_title[' . $languages[$i]['id'] . ']', (isset($metatags_title[$languages[$i]['id']]) ? stripslashes($metatags_title[$languages[$i]['id']]) : zen_get_metatags_title($pInfo->products_id, $languages[$i]['id'])), zen_set_field_length(TABLE_META_TAGS_PRODUCTS_DESCRIPTION, 'metatags_title', **'150'**, false)); //,'id="'.'metatags_title' . $languages[$i]['id'] . '"');?> </td> </tr> <tr> <td class="main"valign="top"><?php echo TEXT_META_TAGS_KEYWORDS; ?> </td> <td class="main"> <?php echo zen_draw_textarea_field('metatags_keywords[' . $languages[$i]['id'] . ']', 'soft', '100%', '10', (isset($metatags_keywords[$languages[$i]['id']])) ? stripslashes($metatags_keywords[$languages[$i]['id']]) : zen_get_metatags_keywords($pInfo->products_id, $languages[$i]['id'])); //,'id="'.'metatags_keywords' . $languages[$i]['id'] . '"'); ?> </td> </tr> <tr> <td class="main"valign="top"><?php echo TEXT_META_TAGS_DESCRIPTION; ?> </td> <td class="main"> <?php echo zen_draw_textarea_field('metatags_description[' . $languages[$i]['id'] . ']', 'soft', '100%', '10', (isset($metatags_description[$languages[$i]['id']])) ? stripslashes($metatags_description[$languages[$i]['id']]) : zen_get_metatags_description($pInfo->products_id, $languages[$i]['id'])); //,'id="'.'metatags_description' . $languages[$i]['id'] . '"'); ?> </td> </tr>

I think if I change the '150' to '80', then it will only allow me to insert 80 characters when I try to use the form.

But I'm not sure how to limit the other two.

Am I on the right track? Can you suggest where/how to modify the other two?

24 May 2010, 8:15 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: I fiddled with the mod: Restructured Add Product Page for Admin v1.02

Changing your '80' vs '150' should be fine for the input field.
But "the other two" are textarea fields, and there is no quick-and-easy way to limit those with just a simple html attribute change. The only way to enforce limits on textarea fields is to add javascript to enforce it.

As for making your copy-and-paste easier, you could add something to the collect_info_metatags.php file to display the current product description, perhaps using zen_get_products_description(), so that you can see the content and either copy-paste it or just look at it as reference while keying in your own content. Similar for keywords if you feel it's really necessary to bother with keywords nowadays.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.