Snarg Posted July 10, 2013 Posted July 10, 2013 Hello, I am doing my best to install this addon to my store however I am running into a slight poblem. In catalog/product_info.php it instructs me to replace this: <span class="buttonAction">tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?></span> With this: <!-- original<span class="buttonAction"> tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?></span>--> <!-- show-soldout-v1.0 for 2.3 --> <span class="buttonAction"><?php if($product_info['products_quantity'] <= 0 || $product_info['products_status']==0) echo tep_image_button('button_sold_out.gif', IMAGE_BUTTON_SOLD_OUT); else echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?></span> <!-- end show-soldout-v1.0 for 2.3 --> The problem is, I don't have that section of code in my store. What I do have is this: <span class="buttonAction"><?php echo '<span class="text">' . TEXT_ENTER_QUANTITY . ' ' . tep_draw_input_field('cart_quantity', '1', 'size="5" style="vertical-align:middle;"') . '</span> ' . tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?></span> I have tried my best to come up with the solution, and have come up with this section of code: <!-- original<span class="buttonAction"><?php echo '<span class="text">' . TEXT_ENTER_QUANTITY . ' ' . tep_draw_input_field('cart_quantity', '1', 'size="5" style="vertical-align:middle;"') . '</span> ' . tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?></span>--> <!-- show-soldout-v1.0 for 2.3 --> <span class="buttonAction"><?php if($product_info['products_quantity'] <= 0 || $product_info['products_status']==0) echo tep_image_button('button_sold_out.gif', IMAGE_BUTTON_SOLD_OUT); else echo '<span class="text">' . TEXT_ENTER_QUANTITY . ' ' . tep_draw_input_field('cart_quantity', '1', 'size="5" style="vertical-align:middle;"') . '</span> ' . tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?></span> <!-- end show-soldout-v1.0 for 2.3 --> My question is, does this look even somewhat correct or am I way off track here? Thank you for your assistance. Quote
Snarg Posted July 11, 2013 Author Posted July 11, 2013 Well, with much fiddling, (yeah, that is a technical term), I have gotten the Sold Out contibution to work on 2.3.3. It's a great contrib, I just wish it was included in the original install. Quote
namasteboy Posted September 30, 2013 Posted September 30, 2013 Hello Snarg, I am trying to install the same contrib and am coming up against issues as well. I see this thread isn't supported but I thought I'd post and see if you came across this issue as well. At step 12 of the instructions it says to replace this code in file catalog/includes/modules/product_listing.php: $prod_list_contents .= ' <td align="center">' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'products_id')) . 'action=buy_now&products_id=' . $listing['products_id'])) . '</td>'; Unfortunately this code line doesn't exist in this file! Did you come across this issue as well? You say you managed to install the contrib so I assume you must have found a way around this. Any help appreciated! Quote
namasteboy Posted September 30, 2013 Posted September 30, 2013 Ignore last post, I have found the code line, BB search was playing up. Quote
Guest Posted September 30, 2013 Posted September 30, 2013 I installed this today. That exact line isn't in the code, but if you search for "IMAGE_BUTTON_BUY_NOW" you'll figure out what to do pretty quickly. Cheers Hello Snarg, I am trying to install the same contrib and am coming up against issues as well. I see this thread isn't supported but I thought I'd post and see if you came across this issue as well. At step 12 of the instructions it says to replace this code in file catalog/includes/modules/product_listing.php: $prod_list_contents .= ' <td align="center">' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'products_id')) . 'action=buy_now&products_id=' . $listing['products_id'])) . '</td>'; Unfortunately this code line doesn't exist in this file! Did you come across this issue as well? You say you managed to install the contrib so I assume you must have found a way around this. Any help appreciated! Quote
♥14steve14 Posted September 30, 2013 Posted September 30, 2013 Why doesnt someone who has this working upload a new file with all the changes done. it would save others the problems. Quote REMEMBER BACKUP, BACKUP AND BACKUP
Guest Posted September 30, 2013 Posted September 30, 2013 Mine is different because I have a custom theme. I figure that is the same problem the other user was having. As far as I know, the code in the contrib should work on a plain install of OSC. Why doesnt someone who has this working upload a new file with all the changes done. it would save others the problems. Quote
namasteboy Posted October 1, 2013 Posted October 1, 2013 I managed to get this contrib working, some of the instructions were slightly incorrect as the coding in file catalog/products_new.php was slightly different in my 2.3.3 version. However, this contrib clashes badly with a previously installed contrib 'Column listing with jquery smart column.v.1.2'. The jquery smart column style is completely broken. This is the major issue I am finding with Oscommerce. As a layman with only basic PHP knowledge it becomes increasingly hard to keep track of style and coding changes as more and more contribs are added. The biggest issue I am finding is the functionality and the style/ form of Oscommerce are not kept separate enough. With snippets of inline CSS amongst the PHP files it really is hard to pinpoint where a style coding bug is throwing off a design. I am sure this will work fine on a vanilla install. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.