And what about just showing it on the website itself? So the customer can see the condition/rarity etc?
Printable View
And what about just showing it on the website itself? So the customer can see the condition/rarity etc?
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 ...
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?
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?
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:
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 ...
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 ...PHP Code:
<?php echo zen_products_lookup((int)$_GET['products_id'], 'rarity'); ?>
If you want the condition and the field for condition is called: condition
You can then use:
NOTE: There is a 3rd paramater for this function ... for language_id ... when that is not passed, it assumes the current $_SESSION['languages_id']PHP Code:
<?php echo zen_products_lookup((int)$_GET['products_id'], 'condition'); ?>
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 ...
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?
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 ...
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).
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 ...
vs before where on the product _info page you were using:Quote:
$listing->fields['products_id']
Quote:
(int)$_GET['products_id']