Post by thepixelmaker » Mon Feb 20, 2012 2:07 am

Salut!
as dori sa modific "pickup from store" ca in pagina de estimare a livrarii cand este selectat aceasta optiune sa arate adresa magazinului setata in admin si nu text-ul de descriere cu este acum. OpenCart 1.5.1.3
Multumesc

Newbie

Posts

Joined
Sat Feb 11, 2012 3:25 am

Post by rob_pal » Mon Feb 20, 2012 9:23 pm

In catalog\contoller\checkout\shipping.php inainte de

Code: Select all

$this->data['text_shipping_method'] = $this->language->get('text_shipping_method');
asta

Code: Select all

$this->data['address'] = nl2br($this->config->get('config_address'));
iar in catalog\view\theme\nume_theme\template\checkout\shipping.tpl unde vrei sa-ti apara adresa pui

Code: Select all

<?php if ($shipping_method['title'] == "Pickup") { ?>
<?php echo $address; ?>
<?php } ?>

New member

Posts

Joined
Tue Jan 10, 2012 6:11 pm
Location - Leeds

Post by thepixelmaker » Thu Feb 23, 2012 11:07 pm

Multumesc,
sincer nu am reusit sa fac. Am reusit sa gasesc mai direct unde se poate modifica (catalog\model\shipping\pickup.php - la linia title) dar nu stiu in ce pagina sa definesc variabila adresa ca sa mearga. Aici sigur nu mi-a mers.

Code: Select all

      		$quote_data['pickup'] = array(
        		'code'         => 'pickup.pickup',
        		'title'        => $this->language->get('text_description'),
        		'cost'         => 0.00,
        		'tax_class_id' => 0,
				'text'         => $this->currency->format(0.00)
      		);

Newbie

Posts

Joined
Sat Feb 11, 2012 3:25 am

Post by florinsith » Fri Feb 24, 2012 1:40 am

In catalog/language/romana/shipping/pickup.php

Code: Select all

$_['text_title']       = 'Pickup';
$_['text_description'] = 'Pickup From Store';
In romana difera cuvintele. Titlul cred ca ar trebuii sa ramana Ridica din magazin , si la descriere sa scrii adresa .Poti introduce si cod html daca doresti, important este sa fie textul intre acele 2 ghilimele singulare.

Image
My Extensions - SuperTheme - Opencart templates - Opencart modules


User avatar
Expert Member

Posts

Joined
Fri May 14, 2010 2:36 am


Post by thepixelmaker » Fri Feb 24, 2012 6:09 pm

Da corect acolo se modifica, dat as fi vrut sa ia adresa din baza de date nu sa fie adaugata manual acolo.

Newbie

Posts

Joined
Sat Feb 11, 2012 3:25 am

Post by florinsith » Fri Feb 24, 2012 9:18 pm

Incearca asa (catalog\model\shipping\pickup.php - la linia title).

Code: Select all

      		$quote_data['pickup'] = array(
        		'code'         => 'pickup.pickup',
        		'title'        => nl2br($this->config->get('config_address')),
        		'cost'         => 0.00,
        		'tax_class_id' => 0,
				'text'         => $this->currency->format(0.00)
      		);

Image
My Extensions - SuperTheme - Opencart templates - Opencart modules


User avatar
Expert Member

Posts

Joined
Fri May 14, 2010 2:36 am


Post by thepixelmaker » Sat Feb 25, 2012 9:00 pm

Nu a mers asa. Dar pana la urma am reusit. Nu stiu daca este cea mai buna metoda dar o prezint.
In "catalog/view/theme/default/template/total/shipping.tpl" am modificat undeva la linia 94 sa faca testul daca este "pickup" si sa arate adresa si nu titlul. Astfel:

Code: Select all

html += '  <td><label for="' + json['shipping_methods'][i]['quote'][j]['code'] + '">' + json['shipping_methods'][i]['quote'][j]['title'] + '</label></td>';

am modificat asa:

Code: Select all

if (json['shipping_methods'][i]['quote'][j]['code'] == "pickup.pickup") {	
								html += '  <td><label for="' + json['shipping_methods'][i]['quote'][j]['code'] + '"><?php echo $adresa; ?></label></td>';	
							} else {		
								html += '  <td><label for="' + json['shipping_methods'][i]['quote'][j]['code'] + '">' + json['shipping_methods'][i]['quote'][j]['title'] + '</label></td>';
							}
iar variabila $adresa am definit-o in pagina: "catalog/controller/total/shipping.php" cu

Code: Select all

$this->data['adresa'] = nl2br($this->config->get('config_address')); // MIHAI
oriunde in functia respectiva

Newbie

Posts

Joined
Sat Feb 11, 2012 3:25 am
Who is online

Users browsing this forum: No registered users and 11 guests