PDA

View Full Version : tep_??? Guide



Rpent001
12-06-2011, 12:21 PM
Which file contains all of the tep_ functions so I can see which ones there are and how they are used. I assume there is good commenting in that file so I can use it as somewhat of a manual?? I would like to learn how to add new fields and options to certain parts of the admin area because my application calls for a few fields that I prefer to be hard coded and not added via the Product Extra Fields add-on.

Case in point: UPC's for products. I am using the first field for the product SKU, but need an additional field for the upc and by adding it to the extra fields mod the column shows up as "extrafield_21" instead of something more useful like "product_upc". I would also like to add a sku and upc field to the product attributes as well. I have a few hundred products who's sku's are based on their color and the UPC codes are different as well. Instead of making a new product for each occurrence of the UPC code/SKU I would like to add a field to the attribute which can then be called on when printing an order or shipping ticket.

I also have a couple dozen other mods/tweaks that I came up with in the past few weeks I would like to implement as well so that I can share them with the community.

Thanks for all your help.:eek:

-Rick

ridexbuilder
12-07-2011, 12:18 AM
What a scary post!!! :o

We (the community) obviously more than welcome useful additions but care in its' implementation is required. For someone who is offering to provide mods/tweaks for the community (thus inferring a considered programming skill of sorts), the information that you seek isn't difficult to find.

10 seconds with Google would have given you this: Where are all the tep functions? - osCommerce Support Forum (http://forums.oscommerce.com/topic/288197-where-are-all-the-tep-functions/) - this is in addition to information provided by Michael some time ago. Also, one might hazard a guess that tep functions can be found in a functions directory, no?
A little bit of lateral thinking would have inspired you to recognise that "extrafield_21" can be re-defined, in that this is just a label.
After much gnashing of teeth, in 'Max 2.5 we have additional field available in attributes, to cater for individual attribute codes, SKU, if you like.

Finally, the addition of contributions isn't just a matter of saying "let's just add this"; the interaction with the many other included contributions has to taken into account. Product reference attributes is a prime example, that has taken approx. two years to be implemented and admittedly is not ideal in its' current form (not being too obvious in its' use) but should be adaptable to suit various scenarios.

pgmarshall
12-07-2011, 03:30 AM
PHPXref 0.7: osCMax 2.0.4 (http://xref.oscmax.com/nav.html?index.htmlAlthough) please note that this is for v2.0.4 - you should be able to find most functions with it. Search is top right in the black bar. Once v2.5 is stable we will rerun xRef for the project and link in the wiki. Regards.

niallb
12-07-2011, 08:44 AM
What a scary post!!! :o


and here I was thinking you didnt scare easily North of the Border :)

ridexbuilder
12-07-2011, 08:55 AM
and here I was thinking you didnt scare easily North of the Border :)
PMSL :snooty:

Rpent001
12-16-2011, 07:42 AM
Thank you for all of your replies. After I had posted this I actually got a bit of inspiration and found what I was looking for so I downloaded the latest version of oscMax and installed it on a dev server to make a few new mods and tweaks to the product entry (categories.php) page. Where can I upload these files so you can take a look at what I have added? Do you want me to add a few posts to the Bug Tracker?

Basically, I added fields for SKU and GTIN (UPC) to the main product as well as one for each product attribute and a dropdown menu for Google Taxonomy categories. All of which are strongly recommended or in some cases required for the feeds to be accepted by Google's new rules. I also changed the whole page to a tabbed system and grouped similar product entry fields together so there is no more endless scrolling up and down the page. I think you will see it is much easier this way.

I am aware that there is a Product Model field, but I left that intact because it could be used for an internal SKU which has nothing to do with the manufacturers item sku and UPC codes.

As for the renaming of the fields; I wasn't sure how that would work with the Product Extra Fields add-on so I left that alone.

-Rick

Rpent001
12-18-2011, 05:30 AM
We (the community) obviously more than welcome useful additions but care in its' implementation is required. For someone who is offering to provide mods/tweaks for the community (thus inferring a considered programming skill of sorts), the information that you seek isn't difficult to find.


I have submitted these two items with code to the bug tracker. I found them to be needed based on what Google is now asking for in their product feeds.

0001057: Google Taxonomy Category Selector - osCmax Bug Tracking System (http://bugtrack.oscmax.com/view.php?id=1057)
0001058: Product SKU and GTIN Fields - osCmax Bug Tracking System (http://bugtrack.oscmax.com/view.php?id=1058)

-Rick

ridexbuilder
12-19-2011, 03:56 PM
I'll try to remember to look, once things have settled down for me.
Thanks for sharing.