Post by theace » Thu Jun 28, 2012 2:30 am

Hiya! This is the first time I'm using opencart and am posting on the forums. So in case you need more data or if this is in the wrong section, I apologize in advance. Let me know if I'm missing anything! My Opencart verison is 1.5.3.1

1. Renaming shipping options: I need to renme "weight based shipping" to Speed Post and "Royal mail" to Stamdard Parcel. How do I go about this? My friend fiddled around with the language files an managed to change Royal mail to India Post on the AdminPanel, but it doesn't show up that way on the store front.

2. Disabling Cash On Delivery for Out of Stocks: How can this be achieved? If something is out of stock, the "Cash on Delivery" option should not be available. Also, if an order contains items that are both in stock and out of stock, the CoD option should be disabled.

3. Organizing Options: I have a product (a pouch) where customers can chose the internal cloth. I have about 40 different materials an want to list all of them. The images need to be visible. However, I don't want theses 40 images to form an infinite vertical coloumn lol... Is there any way that these 40 options can be neatly organized in an 8x5 grid?

Also, if there were 3 types of materials (say Standard, Premium and Deluxe), can the store be configured so that in the options section, all 3 of these are visible sibe by side in 3 coloumns but only one out of each of the 3 coloumns is selectable?

4. Model shows up as product code: In all the products, wherever I've entered a "Model" in the admin panel, it shows up as the "product code" on the front. (For example, when you view a Rubik's cube that has "Black" written in the model field on the admin panel, you will see "Black" as the "Product Code"; the "Model" field is nowhere to be found)

New member

Posts

Joined
Sun Jun 17, 2012 2:17 am

Post by Avvici » Sun Jul 01, 2012 1:19 am

1. Renaming shipping options: I need to renme "weight based shipping" to Speed Post and "Royal mail" to Stamdard Parcel. How do I go about this? My friend fiddled around with the language files an managed to change Royal mail to India Post on the AdminPanel, but it doesn't show up that way on the store front.
FOLLOW THIS POST. JUST APPLY IT TO YOU: http://forum.opencart.com/viewtopic.php?f=20&t=25235

2. Disabling Cash On Delivery for Out of Stocks: How can this be achieved? If something is out of stock, the "Cash on Delivery" option should not be available. Also, if an order contains items that are both in stock and out of stock, the CoD option should be disabled.
CUSTOMERS SHOULDN'T"T EVEN BE ALLOWED TO CHECK OUT IF ANY ITEM FROM THE CART IS OUT OF STOCK. YOU CAN SET THIS PARAMETER IN SETTINGS

3. Organizing Options: I have a product (a pouch) where customers can chose the internal cloth. I have about 40 different materials an want to list all of them. The images need to be visible. However, I don't want theses 40 images to form an infinite vertical coloumn lol... Is there any way that these 40 options can be neatly organized in an 8x5 grid?
USE THIS CODE TO GET YOUR HORIZONTAL GRID. IT"S SET FOR 4 ACROSS X INFINITE DOWN. YOU ALSO NEED THE CSS I AM ATTACHING AS WELL TO STYLE THE TABLE. In product.tpl, you will want to replace the specific option code with this. For example if you are using the option type IMAGE it will look like this:

Code: Select all

<?php if ($option['type'] == 'image') { ?>

        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">

          <?php if ($option['required']) { ?>

          <span class="required">*</span>

          <?php } ?>
         
      
       <?php } ?> 
      
         <br />
<br />
               <table class="list-options">
      <?php for ($i = 0; $i < sizeof($option['option_value']); $i = $i + 4) { ?>
      <tr>
        <?php for ($j = $i; $j < ($i + 4); $j++) { ?>
        
        <td width="25%" ><?php if (isset($option['option_value'][$j])) { ?>
     <td><input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo  $option['option_value'][$j]['product_option_value_id']; ?>" id="option-value-<?php echo  $option['option_value'][$j]['product_option_value_id']; ?>" /><label for="option-value-<?php echo  $option['option_value'][$j]['product_option_value_id']; ?>"><?php echo  $option['option_value'][$j]['name']; ?></label><br /><label for="option-value-<?php echo  $option['option_value'][$j]['product_option_value_id']; ?>"><img src="<?php echo  $option['option_value'][$j]['image']; ?>" alt="<?php echo  $option['option_value'][$j]['name'] . ( $option['option_value'][$j]['price'] ? ' ' . $option['option_value'][$j]['price_prefix'] .  $option['option_value'][$j]['price'] : ''); ?>" /></label><br /> </td>
         
          <?php } ?></td>
        <?php } ?>
      </tr>
      <?php } ?>
    </table>
            

        </div>

        <br />

        <?php } ?>
NOTE*** You will also need to adjust the % if you change the number. Example: 25% is for 4 across because the total width is 100%. If you change it to 5 across the the width of each <td> needs to be 20%.

And the CSS that will go in your stylesheet.css:

Code: Select all

table.list-options {
	border-collapse: collapse;
	width: 100%;
	
	margin-bottom: 20px;
}
table.list-options td {
	text-align:left;
	

}
table.list-options td img{
padding:10px 0px 10px 0px;


}

table.list-options thead td a, .list thead td {
	text-decoration: none;
	color: #222222;
	font-weight: bold;
}
table.list-options tbody td {
	
	float:left;
	padding: 0px 5px;
}
table.list-options .left {
	text-align: left;
	padding: 7px;
}
table.list-options .right {
	text-align: right;
	padding: 7px;
}
table.list-options .center {
	text-align: center;
	padding: 7px;
}
Also, if there were 3 types of materials (say Standard, Premium and Deluxe), can the store be configured so that in the options section, all 3 of these are visible sibe by side in 3 coloumns but only one out of each of the 3 coloumns is selectable? Don't have time for this one.

4. Model shows up as product code: In all the products, wherever I've entered a "Model" in the admin panel, it shows up as the "product code" on the front. (For example, when you view a Rubik's cube that has "Black" written in the model field on the admin panel, you will see "Black" as the "Product Code"; the "Model" field is nowhere to be found)
It actually is the same thing. If you want to change the text to MODEL then do it in the language file:
/catalog/language/english/product/product.php

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by theace » Sun Jul 01, 2012 11:30 am

I'll ask my techie friend to have a look at this.

CUSTOMERS SHOULDN'T"T EVEN BE ALLOWED TO CHECK OUT IF ANY ITEM FROM THE CART IS OUT OF STOCK. YOU CAN SET THIS PARAMETER IN SETTINGS:

Actually, we've added a stock opetion called "Pre-order" where people pay us first and then, we order their stuff from our suppliers. If we don't have the money, we can't buy their stuff in the first place which is why I cant allow CoD to work with Preorders. However, other payment and ddelivery methods can still be permitted...

New member

Posts

Joined
Sun Jun 17, 2012 2:17 am
Who is online

Users browsing this forum: No registered users and 48 guests