Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

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.

Posted

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.

  • 2 months later...
Posted

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!

Posted

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!

Posted

Why doesnt someone who has this working upload a new file with all the changes done. it would save others the problems.

REMEMBER BACKUP, BACKUP AND BACKUP

Posted

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.

Posted

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.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...