Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

More Product Attribute questions


Recommended Posts

Hi all!


Thanks all who helped me with my other problems! I now got it running...



I want to add two attributes to my products. I've tried to search the Contributions, but can't seem to find anything that seems to be what I'm looking for.


What I want is to add one (or more) HIDDEN attributes to each product. I need them to "be there" in the database, but not seen in the shop.


I also want to add one (or more) attributes to each product that are "locked" and not changeable by the user, like one more info-text-screen.


I'm going to use them for two more prices. The first one is the price I buy the product for, I don't want users to see that, the second is what the product sells for in other stores - I DO want them to see that! But I really need them to be different attributes, since I am changing the attributes in another program.


All suggestions welcome!


Thank you!


/ Pingo

Link to comment
Share on other sites

Look for static attributes in the contribution area. It allows for this.



I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!


Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

I think I need to broaden this... I hope I can get help though I'm not starting a new topic.




Well, the thing is, I need these "additional attributes" linked to more things than I first thought.



1: I need a second ADD TO CART-button.

2: I need a "login-version" of the site with DIFFERENT prices.




The additional ADD TO CART-button should be linked to a second price-attribute. The Shopper should be able to CHOOSE to buy either with the regular add-to-cart-button or with the new one. (The reason for this is that the shopper would pay a little more with one of the buttons, but he would get another product with it as well - a special deal thing.)


Is this possible to do?



The login-version is for Real Stores that log in and wants to buy from the online-store. They will have a THIRD price and this should now, when they are logged in, be linked to the regular ADD TO CART-button. The second add-to-cart-button (the "special deal" thing above) should not be visible.


Is this possible to do?




Well, those are my problems right now... :-/ Anyone with any bright ideas??


Thanks in advance!!


/ Pingo

Link to comment
Share on other sites

I don't really see the info you're talking about as an attribute, in the usual osc attributes/options sense. Your needs could be served with two extra columns in the products table, like my_price, and comp_price for example. You could add these tables, modify the catalog/admin/categories.php file to add input boxes for these values.


Find this code:

           <td class="main"><?php echo TEXT_PRODUCTS_PRICE_GROSS; ?></td>
           <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_price_gross', $pInfo->products_price, 'OnKeyUp="updateNet()"'); ?></td>


After it add this:

           <td class="main"><?php echo TEXT_PRODUCTS_MY_PRICE; ?></td>
           <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_my_price', $pInfo->products_my_price, 'OnKeyUp="updateNet()"'); ?></td>
           <td class="main"><?php echo TEXT_PRODUCTS_COMP_PRICE; ?></td>
           <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_comp_price', $pInfo->products_comp_price, 'OnKeyUp="updateNet()"'); ?></td>


Then in catalog/admin/includes/languages/english/categories.php add:

define('TEXT_PRODUCTS_MY_PRICE', 'My Price:');
define('TEXT_PRODUCTS_COMP_PRICE', 'Competitor Price:');


To add the colums to the database, you would run this SQL command:

ALTER TABLE products ADD my_price int(10);
ALTER TABLE products ADD comp_price int(10);


To show customers the competitor's price, you'd need to modify catalog/product_info.php to call the price, and the related text, and show it where you wanted it, as well as add a define to the language file that defined the text you want associated with it.


Your price would only show up on the product page available to you in the admin panel (unless you called for it yourself elsewhere).


Jeremy (backup your files before altering anything! db too!)

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...