示例#1
0
 public function update()
 {
     if ($this->viewAccess() && JeproshopTools::checkCountryToken()) {
         if ($this->has_errors) {
             return false;
         }
         $input = JRequest::get('post');
         $country_id = $input['country_id'];
         $app = JFactory::getApplication();
         $countryModel = new JeproshopCountryModelCountry();
         if ($countryModel->updateCountry()) {
             $app->enqueueMessage(JText::_('COM_JEPROSHOP_COUNTRY_HAS_BEEN_SUCCESSFULLY_UPDATED_MESSAGE'));
             $app->redirect('index.php?option=com_jeproshop&view=country&task=edit&country_id=' . (int) $country_id . '&' . JeproshopTools::getCountryToken() . '&=1');
         }
     }
 }
示例#2
0
                </tr>
            </thead>
            <tbody>
                <?php 
if (empty($this->countries)) {
    ?>
                <tr><td colspan="8" >
                <div class="alert alert-no-items" ><?php 
    echo JText::_('JGLOBAL_NO_MATCHING_RESULTS');
    ?>
</div>
                </td></tr>
                <?php 
} else {
    foreach ($this->countries as $index => $country) {
        $country_link = JRoute::_('index.php?option=com_jeproshop&view=country&task=edit&country_id=' . $country->country_id . '&' . JeproshopTools::getCountryToken() . '=1');
        $country_state = $country->published ? 'icon-publish' : 'icon-unpublish';
        ?>
                <tr class="row_<?php 
        echo $index % 2;
        ?>
 " >
                    <td class="order nowrap center hidden-phone" ><?php 
        echo $index + 1;
        ?>
</td>
                    <td class="order nowrap center hidden-phone" ><?php 
        echo JHtml::_('grid.id', $index, $country->country_id);
        ?>
</td>
                    <td class="order nowrap center hidden-phone" >
示例#3
0
                        </tr>
                    </thead>
                    <tbody>
                        <?php 
if (empty($this->zones)) {
    ?>
                        <tr>
                            <td colspan="5" ><div class="alert alert-no-items" ><?php 
    echo JText::_('JGLOBAL_NO_MACTHING_RESULTS');
    ?>
</div></td>
                        </tr>
                        <?php 
} else {
    foreach ($this->zones as $index => $zone) {
        $zoneLink = JRoute::_('index.php?option=com_jeproshop&view=country&task=edit_zone&zone_id=' . $zone->zone_id . '&' . JeproshopTools::getCountryToken() . '=1');
        $allow_delivery = $zone->allow_delivery ? 'icon-publish' : 'icon-unpublish';
        ?>
                        <tr class="row_<?php 
        echo $index % 2;
        ?>
" sortable-group-id="<?php 
        ?>
">
                            <td class="order nowrap center hidden-phone"><?php 
        echo $index + 1;
        ?>
</td>
                            <td class="order nowrap center hidden-phone"><?php 
        echo JHtml::_('grid.id', $index, $zone->zone_id);
        ?>
示例#4
0
                        <th class="nowrap" ><?php 
echo JText::_('COM_JEPROSHOP_DESCRIPTION_LABEL');
?>
</th>
                        <th class="nowrap" ><span class="pull-right" ><?php 
echo JText::_('COM_JEPROSHOP_ACTIONS_LABEL');
?>
</span></th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php 
if (isset($this->tax_rules)) {
    foreach ($this->tax_rules as $index => $tax_rule) {
        //print_r($tax_rule);
        $countryLink = JRoute::_('index.php?option=com_jeproshop&view=country&task=edit&country_id=' . (int) $tax_rule->country_id . '&' . JeproshopTools::getCountryToken() . '=1', true, 1);
        $taxLink = JRoute::_('index.php?option=com_jeproshop&view=tax&task=edit_rule&tax_rule_id=' . (int) $tax_rule->tax_rule_id . '&' . JeproshopTools::getTaxToken() . '=1', true, 1);
        $deleteTaxLink = JRoute::_('index.php?option=com_jeproshop&view=tax&task=delete_rule&tax_rule_id=' . (int) $tax_rule->tax_rule_id . '&' . JeproshopTools::getTaxToken() . '=1', true, 1);
        ?>
                            <tr class="row_<?php 
        echo $index % 2;
        ?>
" >
                                <td width="1%" class="nowrap center hidden-phone"><?php 
        echo $index + 1;
        ?>
</td>
                                <td width="1%" class="nowrap center hidden-phone"><?php 
        echo JHtml::_('grid.id', $index, $tax_rule->tax_rule_id);
        ?>
</td>