-
Adding new Qualifiers to
If you visit www.Buymorecards.net and click a set -- you will see all the cards listed in that set. Pretty simple.
How does one add more "qualifiers" to the list of cards? We would like to add "RARITY" and "CONDITION" between where it says "ITEM NAME" and quantity. We already have it set up on the item page (if you click on a card) but not in each set.
Also, in relation to that...how would we set it up so that on our packing slip/order/shopping cart, we would know which condition a card was when sold?
We ran into an order where we weren't sure which card was which.
Btw, we don't use the product attributes page, we use a database to hold all that info.
thank you!
-
Re: Adding new Qualifiers to
-
Re: Adding new Qualifiers to
When you call them "Qualifiers" ... are these choices the customer can make and select from?
Or are these descriptions that you are telling the customer and that this is not a choice?
If this is a choice that the customer makes, you are wanting to use Attributes ... these allow the customer to select what they want, and, in turn, you can alter the price if need be based on that selection ...
IF this is not a choice that the customer makes ... why would you need the Product to list it on the order ... wouldn't the Product itself be the "qualifier" for the order?
-
Re: Adding new Qualifiers to
Hi,
Not to sound condensending, but if you woudl look at our site, you'd see what we mean.
Some cards are "poor", "mint", etc. Some cards are foils, some are not. Some cards are rares and uncommons, some are not. Etc. So we wanted to put that beside each and every card. No choices to be made, just so the customer can see what is being offered.
-
Re: Adding new Qualifiers to
As I haven't a clue how you have configured your Products ...
What is it that is reading on products_id 183:
Quote:
Aladdin's Lamp
$1.50 Condition - Near Mint
-
Re: Adding new Qualifiers to
What do you mean by "what is reading?"
In one table we have image, quantity and ID, in another we have all the other things, cast_cost, foil, artist, set, rarity and all those other things.
I guess all we want to know is, how do we add more things to the category? (well, all of them). Its hard to ask a question when I'm not sure what to call it.
The page of a category that lists all the items in it. We want to show more things about each one than what is already there. What template would that be under to modify? We have all that data, I just would like to be able to show it on taht page. (see above). Thank you.
-
Re: Adding new Qualifiers to
I am asking you ... what database and field contains that information:
Condition - Near Mint
-
Re: Adding new Qualifiers to
The database and field are :
Database: buymorecards_net_-_mycards -
Table: products_Description
how would this help?? thanks!
-
Re: Adding new Qualifiers to
I am trying to determin if you already have the information you want to display in the database in a manner that can be displayed in the Admin easily ...
From what you are saying ... the condition of the card is not in a useful field perse but rather in an ambiguous field of the products_description ...
One thing I am not understanding is how if the products_id is defined that the customer ordered, you do not know what this product is without its description ...
You could add a new field and have this information defined so that it can be displayed in the Catalog and the Admin easily ...
But you would need to do some customization to add the new field ...
This would probably be the best way to manage this ...
-
Re: Adding new Qualifiers to
The way we know which cards have been purchased is two-fold.
One, certain cards are only in certain sets. Two - the item ID's come up so if there are duplicates in sets, we know the spcific cards purchased.
The attributes to the cards (rarity, etc) are all in the database fields...so they are all there...I guess its just a matter of acquiring them to show up. How do we add a new field so they show up like you mentioned??
-
Re: Adding new Qualifiers to
I would trace the field product_is_free in the products table ...
One way to do this is search for the word: free
This will result in a bit more than you need to change but this is a field that has 3 choices and managed as a radio button ...
You could make a new field: products_condition
And everywhere you find this field in the Admin you will see where to add in the new field ...
Then, expand it to include all of your conditions ...
Make a function to translate the value of the condition into text that you could display in the Admin and you could also use to display in the Catalog if need be ...
It is up to you if you want to use this just for tracking your products for identifying the card condition on both sides ...
Looking just for: product_is_free will locate most of where you need this field added, but to assure that there are not spots where a different variable is used, also do the search for: free
Note: the Tools ... Developer's Tool Kit ... is very handy for locating variables, fields, etc. in the php files ...
-
Re: Adding new Qualifiers to
With you so far -- The "product is free" will be the rarity, correct - The 3 values? Or would it be condition?
So how do we insert the values into the database? We have over 50,000 items and hand inserting them would take some time.
So all this will have the cards condition show up where we'd like...between name and quantity? Thank you.
-
Re: Adding new Qualifiers to
I picked the field products_is_free because it is a value that uses multiple choices in the admin via radio button ... and might be easier to follow in the code when adding the new field for: adding, editing, copying, etc.
As to how to update all of your Products with the code, you could get tricky on this ...
If you have the card condition in the products_description field ... you could write an update script that looks for that text, providing it is unique, and can update the code that you assign to the new field for the products_condition ...
NOTE: be sure that you have good backups of your database and website before making any of these changes ...
-
Re: Adding new Qualifiers to
With you so far....
So I'm not computer science person (i know limited php) how does an update script start?
I think the values for condition in the database are NM,PL,PO for the three conditions. They are in the products_Description table, but in their own field (condition).
I'd just adjust it for Rarities as well i'd image once i figure that out.
Sorry, please forgive me, i'm trying to learn php as fast as possible.
Quote:
Originally Posted by Ajeh
I picked the field products_is_free because it is a value that uses multiple choices in the admin via radio button ... and might be easier to follow in the code when adding the new field for: adding, editing, copying, etc.
As to how to update all of your Products with the code, you could get tricky on this ...
If you have the card condition in the products_description field ... you could write an update script that looks for that text, providing it is unique, and can update the code that you assign to the new field for the products_condition ...
NOTE: be sure that you have good backups of your database and website before making any of these changes ...
-
Re: Adding new Qualifiers to
Stop ... freeze ...
Are you already saying you have these Card Conditions coded and in the database?
If so, why are we even discussing adding them yet again when they can by just displayed from the new field you already have in the products_description table?
What is the new field that you added to that table called?
Any reason that it is in the products_description table, which is a language oriented table, vs the products table which is the Product oriented table ...
Meaning ... did the condition change just because the language does? Or how are you using this field if you are using codes?
-
Re: Adding new Qualifiers to
Lol.
Yes, the card conditions are already in the database.
Under their own field in a table. Card_conditions in the table ..
Actually all the things we would like to show customers are in that table.
I didn't set up the databases, my webmaster did. And he's not around for a while.
So how do we go about showing those fields (what is the .php file) to show those things on that page between name and quantity? What is the default page to edit and show them? Thank you.
-
Re: Adding new Qualifiers to
I was wrong.
Card_condition is the field in the table products_Description.
I hope my terminology was correct.
-
Re: Adding new Qualifiers to
*thud*
I am not sure what your table structure is nor whether you are typing your field names and database table names exactly as they appear or just randomly ...
Card_condition is this really card_condition
And is card_condition sitting in the products_description table?
From what I can see you just need to pull the existing data from the existing field that you already added before this whole thread started and display it in the Admin ...
The data is not in the field products_description ... it is in the table products_description in a field called card_condition where you can look to see how the products_name is pulled from the database table products_description and add the field card_condition to the same select statements and then be able to display that information in the same manner that the products_name is displayed ...
-
Re: Adding new Qualifiers to
Yes the fields and tables I gave you were correct.
So how does one go about showing this data in the admin?
Table - products_description
column - products_condition
-
Re: Adding new Qualifiers to
Find the page you want to display the information ...
example: /admin/orders.php
You will see where it calls:
$order->products[$i]['name']
The problem here is that the products_name was added to the orders_products table during the purchase ...
While you could look up this value, this value may no longer be valid if the product gets deleted later ...
The better way would be to add the products_condition to the orders_products table during the checkout ...
This is done in the /includes/classes/order.php
This is where you would want to add the field products_condition also to the orders_products table in your database and have that added in via the orders class when the order is made ...
If you follow the products_name you should be able to see where this happens ...
Then, in the Admin ... you can obtain the products_condition from the orders table in the same manner that the products_name is displayed by adding it to the select statement(s) where it is called so that you can display it on your orders.php, invoice.php and packingslip.php ...
-
Re: Adding new Qualifiers to
And what about just showing it on the website itself? So the customer can see the condition/rarity etc?
-
Re: Adding new Qualifiers to
You trace the products_name to locate all the places that the products_description table is used ... and add the products_condition to the select statements ...
Or, make a lookup function to get that information for you based on products_id ...
It really depends on what page you are on, and how you want to display this etc.
I'd probably have a function to get the products_condition code and another for the translated products_conditions code so that I can use either depending on what I need it for ...
Where I can just add the products_condition in a select statement and have overrides ... I may find it easy enough to override the file to get the info ...
If I am only displaying the information on a few pages, I'd probably just use the functions and echo the results rather than re-write all of the code as this is easier to follow than a lot of changes in multiple places ...
-
Re: Adding new Qualifiers to
So getting back to that page with the cards listed...we wanted to get the rarity and condition fields between "name" and "quanitity" on our card set pages.
What is the page to edit to get those inserted?
-
Re: Adding new Qualifiers to
Let's pretend that no one but you knows anything about the cards and what page you are really referring to since we have discussed Admin and Catalog ... :blink:
Could you be a tad more specific about what page you are looking at that you want re-arranged? :smile:
I am guessing that now there are 2 new fields? rarity and products_condition?
Where in the database tables is the rarity data held? What is its field name?
-
Re: Adding new Qualifiers to
I apologize. I understand you do not have knowledge of our site so when I throw terms around, I'm doing a bad job, and I understand that my terminology for these files is poor (at best). I'll start from the beginning. :blush:
Go to our site - www.Buymorecards.net
Click on the first set to the left - "4th Edition".
You'll see the set description as text, and you'll see all the cards in that set listed below.
Each card in the set has its name, quantity, image and price. Some of those cards are duplicated however, b/c some might be of a different condition, whatever, etc.
So all that data is being kept in two tables. We want to clarify to the customer that when they are looking at one card, its a common, or a less-than-mint card, or whatever -- its right there and you don't have to click on it.
If you click on an individual card you will see the data we'd like to show (for the most part, haven't finished that yet).
One table data is kept in is called "products" and one table is called "products_description". Each has several fields?? or columns?? in those tables -- but everything is there.
So the rarities are in table "products_Description" (which I know is a field as well --could be leading to confusion on our part) and its under the field "rarity". Condition is the same - "products_Description" and field "condition" in that table.
We also have a field "FOIL" that has a 1 for a foil card (shiny) and 0 if its not. We'd like to implment that as well into the catalog page, but first things first.
Our question is, we want to add these new Fields?? to the catalog, so when you have that set open, more details are for the customer -- ex. beside Aladdin's Lamp you'll see more than what is there now (add the rarity/conditon/etc). We would like the rarity and condition to the right of the name but to the left of the quantity.
WHEW. sorry for starting over, but maybe you'd have a better grasp of what we're asking since I'm *bonking* my head on the table over this. :bored:
-
Re: Adding new Qualifiers to
Probably the easiest thing to do is to use a function to retreive the rarity and condition information ...
This can then be displayed on the tpl_products_info_display.php file where you want to see it ...
There is a function called: zen_products_lookup
This will look up in the products and products_description table anything you need ...
Example: to pull the field rarity from the table, you just need to spell the field name correctly and pass the right variable for the $products_id ...
The $products_id will change depending on where you are when you call it ...
PHP Code:
<?php echo zen_products_lookup((int)$_GET['products_id'], 'rarity'); ?>
The (int)$_GET['products_id'] is used to obtain the products_id from the tpl_products_info_display.php regardless of if there is an attribute or not attached to it ...
If you want the condition and the field for condition is called: condition
You can then use:
PHP Code:
<?php echo zen_products_lookup((int)$_GET['products_id'], 'condition'); ?>
NOTE: There is a 3rd paramater for this function ... for language_id ... when that is not passed, it assumes the current $_SESSION['languages_id']
Where and how you place the echo of this function is up to you ...
Copy the file:
/includes/templates/templates_default/tpl_product_info_default.php
to your templates and overrides directory:
/includes/templates/your_template_dir/tpl_product_info_default.php
See if this doesn't help you in obtaining the information from the database tables products and products_description ...
As to adding this information or changing it on a product, you would need to customize the Admin files ...
-
Re: Adding new Qualifiers to
Ok, just to clarify...
Thats for the listing of all the items in a category, not the individual cards when you click on them -- correct?
-
Re: Adding new Qualifiers to
No ... this is the individual card where the URL contains product_info in it ...
You would need to adjust the products_id variable that is passed in the function for other pages of the shop if you wish to display the information for them as well ...
-
Re: Adding new Qualifiers to
I figured as much.
As per the last post -- we wanted to list product information in the category of the item. Please see our post where we described the problem. We wanted the rarity/condition shown on the list of cards, NOT on the inddivudal cards (that is already there).
-
Re: Adding new Qualifiers to
If you peek in the code for the module for product listing ... you will see how the products_id is referred to ...
So you pass the new referrence using the function ...
Quote:
$listing->fields['products_id']
vs before where on the product _info page you were using:
Quote:
(int)$_GET['products_id']
-
Re: Adding new Qualifiers to
so $listing->fields['products_id']
is one what page of zen to customize to add said things. We don't want to add more items, we want to add other fields of the tables.
its like we're going round and round here.
All we want to know is how to add more qualifiers to the page of a category.
How to add more things from the fields of the database into our categories of items. NOT the individual items, but the categories. We want to show the customer more of an item in the category. Thank you.
-
Re: Adding new Qualifiers to
The current Product Listing allows for approximately 10 fields to be displayed ...
If you want anything beyond this, you need to customize the code ...
I have given you a function capable of pulling any field name that you can spell correctly that is contained in either the products or the products_description table ... mearly by passing it the products_id and the field name ...
You will need to place these fields into the code where you want to display them for the Products Listing ...
You will need to customize the /includes/modules/product_listing.php
NOTE: this file runs or outputs based on what fields you have activated or set a value higher than 0 in the Configuration ... Product Listing ...
Example:
on line 101 ... just below the $lc_text = blah blah blah ... add the code:
PHP Code:
$lc_text .= '<br />I SEE ' . zen_products_lookup($listing->fields['products_id'], 'products_quantity');
Note: how now the listing shows the products_quantity under the Products Name ...
All you need to do is figure out what the name of your field is that you want to see and where to stick your info for your listings ...