Template API

In your templates you have access to objects of the following classes: SafeBlogPost, SafeBrand, SafeCampaign, SafeCategory, SafeCompany, SafeCountry, SafeCustomer, SafeCustomerField, SafeImage, SafeLandingPage, SafeMenu, SafeMenuItem, SafeOrder, SafeOrderLabel, SafeOrderProduct, SafeOrderReturn, SafeOrderReturnProduct, SafePage, SafePager, SafePaymentGateway, SafePoint, SafeProduct, SafeProductFile, SafeProductLabel, SafeProductProfileAttributeValue, SafeProductReview, SafeProfile, SafeProfileAttribute, SafeRecurringOrder, SafeRecurringOrderProduct, SafeShipping, SafeSupplier, SafeVoucher, SafeWebshop, SafeWishlist, SafeWishlistProduct.

SafeBlogPost #

getBlogPostId() #
getUrl($action = 'view', $controller = null) #
getRemoteUrl() #
getTitle() #
getBody() #
parse($text) #
canEdit() #
getImages() #
getMetaValues() #
getMetaValue($key) #
getHtmlFields() #
getHtmlField($tag) #
getMetaTitle() #
getMetaDescription() #
getUserName() #
getCreated() #
getUpdated() #
getProducts($limit = 50) #
getOpenGraphTitle() #
getOpenGraphDescription() #
getOpenGraphImage() #
getExtensionValue($name) #
getCategories() #
getNoIndex() #

SafeBrand #

getImage() #
getBrandId() #
getName() #
getRemoteUrl() #

SafeCampaign #

canUse() #
getName() #
getDescription() #
getPrice() #
getPriceModel() #
getPercent() #
getExpires() #
getImage() #
getCampaignId() #

SafeCategory #

getInMenu() #
getIsOnline() #
getProductCount() #
getRemoteUrl() #
getSlugName() #
getImages() #
getCategoryId() #
getParentId() #
isFront() #
getUrl($action = 'view', $controller = null) #
getName() #
getDescriptionA() #
getDescriptionB() #
getParents($reverse = '') #
getChildren() #
getCategoriesFromLevel($level) #
canEdit() #
getTree() #
getOnlineProducts($limit = 2500, $offset = 0, $count = null, $sort = null, $sort_order = 'DESC') #
$sort = default | sold | price | alphabetic | created
$sort_order = asc | desc
Argumenterne sort og sort_order tages også fra GET-parametrene som fx ?sort=sold&sort_order=desc
getBlogPosts($limit = 2500, $offset = 0, $count = null, $sort = null, $sort_order = 'DESC') #
getMetaValues() #
getMetaValue($key) #
getMetaTitle() #
getMetaDescription() #
getHtmlFields() #
getHtmlField($tag) #
getTag() #
getOpenGraphTitle() #
getOpenGraphDescription() #
getOpenGraphImage() #
getPrimarySearchPhrase() #
getNoIndex() #
getPopularProducts($limit = 25, $days = 90, $exclude = null) #
getGoogleCategory() #
getExtensionValue($name) #
getBlogPostUrl() #

SafeCompany #

getCompanyId() #
getName() #
getRegNr() #
getAddress() #
getZipcode() #
getCity() #
getCountry() #
getEmail() #
getPhone() #
getWebshops() #

SafeCountry #

getCountryId() #
getName() #
getCode() #
getIsDefault() #
getFreeAbove() #
getVat() #
getPrice() #
hasShipping($shipping_id) #

SafeCustomer #

getActivePoints() #
getPendingPoints() #
getSpendPoints() #
getPointsAvailable() #
getPoints() #
Array af points kunden har optjent eller brugt
getHasOneClick() #
canUseOneClick() #
getChangeCardUrl() #
getSubscriptionId() #
getCustomerId() #
getCardInfo() #
getCardType() #
getName() #
getFirstname() #
getEmail() #
getAddress() #
getZipcode() #
getCity() #
getPhone() #
getCountryId() #
getShippingName() #
getShippingAddress() #
getShippingZipcode() #
getShippingCity() #
getShippingCountryId() #
getVatNumber() #
getCompany() #
getTokenUrl() #
getCountry() #
getShippingCountry() #
getSubscriptions() #
getWishlists() #

SafeCustomerField #

getVal() #
getCustomerFieldId() #
getName() #
getTag() #
getType() #
getValues() #

SafeImage #

getSrc($w, $h, $t = 'fit', $format = null, $quality = null) #
$w = bredten på billedet
$h = højden på billedet
$t = box | fit
$format = jpg | png | webp
$quality = 0 ... 100
getInline($width, $height, $type = 'fit', $format = null, $quality = 100) #
Returnerer et base64 inline billede
getHtmlSize($w, $h, $t, $format = 'png', $quality = 100) #
Returnerer html-felterne til billedets størrelse så siden loader pænere
getDescription() #
getImageId() #
getWidth() #
getHeight() #
getVariantAttributeValueId() #
Returnerer ID'et på den variant billedet evt. er tilknyttet
getVariantName() #
Returnerer navnet på den variant billedet evt. er tilknyttet

SafeLandingPage #

getCachedProductIds() #
getActivateRss() #
getRemoteUrl() #
getImages() #
getLandingPageId() #
getUrl($action = 'view', $controller = null) #
getName() #
canEdit() #
getDescription() #
getDescriptionA() #
getDescriptionB() #
getProducts($limit = 25000, $offset = 0, $count = null) #
getProductCount() #
getMetaValues() #
getMetaValue($key) #
getHtmlFields() #
getHtmlField($tag) #
getOpenGraphTitle() #
getOpenGraphDescription() #
getOpenGraphImage() #
getPrimarySearchPhrase() #
getNoIndex() #
getRules() #
getExtensionValue($name) #

SafeMenu #

getTag() #
getName() #
getMenuId() #
getItems() #
getChildren() #

SafeMenuItem #

getMenuItemId() #
getUrl($action = 'view', $controller = null) #
getVal() #
getType() #
getTitel() #
getTitle() #
getClass() #
getObject() #
getItems() #

SafeOrder #

getShipping() #
getShippingName() #
getComments() #
getIsCreditNote() #
getOriginalWebshopOrderId() #
getPaid() #
getOrderId() #
getInvoiceId() #
getTime() #
getEmail() #
getPhone() #
getSetting($n) #
getWebshopOrderId() #
getTrackingNumber() #
getTrackingNumbers($as_string = '') #
getTrackingUrl() #
getPublicUrl($action = 'order') #
hasReviews() #
getUrl($action = 'view', $controller = null) #
getCreditUntil() #
getProductVouchers() #
getStatus() #
getOrderPrice() #
= getPrice() - getShippingPrice()
getPrice() #
Ordrens pris uden fragt med moms
getTotalPrice() #
Total inkl. alt
getTotalPriceExVat() #
getTotalPrice() - getVat()
getShippingPrice() #
getVat() #
getIsPaid() #
getPaymentUrl() #
getReviewUrl() #
getReturnUrl() #
getEanNumber() #
getPaymentPrice() #
getOrderName() #
getOrderFirstName() #
getOrderCompanyName() #
getOrderAddress() #
getOrderAddress2() #
getOrderZipcode() #
getOrderCity() #
getOrderCountry() #
getDelName() #
getDelCompanyName() #
getDelAddress() #
getDelAddress2() #
getDelCity() #
getDelZipcode() #
getDelCountry() #
getPickupAddress() #
getShopId() #
getBasketId() #
getVatNumber() #
getOrderProducts() #
getProducts() #
getOrderProductCount() #
getExtras($field = null) #
getVoucher() #
getVoucherDiscount() #
getVoucherDiscountAmount() #
getVoucherCode() #
setTrackingCalled($i = 1) #
getTrackingCalled() #
getPaymentGateway() #
getPaymentGatewayId() #
getCardType() #
getTransactionId() #
getShippingWeight() #
getTtStatus() #
getTtData() #
getUtmSource() #
getUtmMedium() #
getUtmCampaign() #
getUtmTerm() #
getUtmContent() #
getAlsoBought() #
getOrderLabels() #
getCampaigns() #
int getDelCountryId() #
getCustomer() #
getCampaign() #
Brug getCampaigns() i stedet for denne
getCampaignDiscount() #
getPointsUsed() #
getPointsEarned() #

SafeOrderLabel #

getOrderLabelId() #
getName() #

SafeOrderProduct #

getAmount() #
getProduct() #
getProductId() #
getOrderProductId() #
getUnitPrice($amount = 1) #
getUnitVat($amount = 1) #
getCalculatedUnitPrice($amount = 1) #
getCalculatedUnitVat($amount = 1) #
getPrice($amount = 1) #
getPriceExVat($amount = 1) #
getRealPrice($amount = 1) #
getName() #
getComment() #
getFromBundle() #
getOwnId() #
getAttributes() #
getImages() #
getImage() #
getFile() #
getFileDownloadUrl() #
int getReturned() #

SafeOrderReturn #

getReturnProductCount() #
getStatus() #
getPublicUrl() #
getOrderReturnId() #
getTime() #
getPrice() #
getVat() #
getReturnPrice() #
getReturnVat() #
getShippingPrice() #
getShippingVat() #
getShipping() #
getOrder() #
getReturnProducts() #

SafeOrderReturnProduct #

getUnitPrice() #
getUnitVat() #
getReason() #
getProduct() #
getAttributes() #

SafePage #

getPageId() #
getUrl($action = 'view', $controller = null) #
getRemoteUrl() #
getHeadline() #
getIsFront() #
getText() #
parse($text) #
canEdit() #
getImages() #
getMetaValues() #
getMetaValue($key) #
getHtmlFields() #
getHtmlField($tag) #
getOpenGraphTitle() #
getOpenGraphDescription() #
getMetaTitle() #
getMetaDescription() #
getOpenGraphImage() #
getPrimarySearchPhrase() #
getNoIndex() #
getExtensionValue($name) #

SafePager #

render() #

SafePaymentGateway #

getPaymentGatewayId() #
getName() #
getType() #
getSecret() #
getImage() #
getHtmlFields() #
getHtmlField($tag) #
hasInvoiceAddressSelection() #

SafePoint #

getTime() #
getStatus() #
getPendingUntil() #
getPoints() #
getExpires() #
getOrder() #

SafeProduct #

getVariant() #
getProductId() #
getOwnId($attribute_value_id = null, $attribute_id = null) #
getSecOwnId($attribute_id = null, $attribute_value_id = null) #
getGtin($attribute_value_id = null, $attribute_id = null) #
getSiblings() #
getNoShopping() #
getMpn($attribute_value_id = null, $attribute_id = null) #
getHasCreditUntil() #
getNeverFreeShipping() #
getCreditUntil() #
getHasCreditDays() #
getCreditDays() #
getCampaigns() #
getHasCreditDate() #
getCreditDate() #
getIsVoucher() #
getVoucherDays() #
getVoucherAmount() #
getLocation($attribute_value_id = null, $attribute_id = null) #
getAllowNegativeStock() #
canEdit() #
getMetaValues($parsed = '1') #
getSubscriptionInterval() #
hasVariant() #
hasVariants() #
getSubscriptionPrice($country_id = null) #
getMetaValue($key, $parsed = '1') #
getUrl($action = 'view', $controller = null) #
getRemoteUrl() #
getName() #
getDescription() #
getListDescription() #
getParsedDescription() #
getTariffCode() #
getCountryOfOrigin() #
getProductVat($country_id = null) #
getPrice() #
getDiscountPrice() #
getRealPriceExVat($amount = 1, $attributes = 'Array') #
getPriceExVat() #
getSalePriceExVat() #
getBulkDiscountOver() #
getBulkDiscount() #
getBulkDiscountPrice($a = 'Array') #
getLowestRealPriceAttributeValueId() #
getLowestSalePriceAttributeValueId() #
getLowestPriceAttributeValueId() #
getLowestRealPrice() #
getLowestPrice() #
getLowestSalePrice() #
getSalePrice() #
getRealVat($amount = 1, $attributes = 'Array') #
getRealPrice($amount = 1, $attributes = 'Array', $no_voucher = '', $skip_basket_check = '', $price_per_unit = null) #
getDiscountPriceInclVat($amount, $attribute_value_id) #
getRealSubscriptionVat($amount = 1, $attributes = 'Array', $country_id = null) #
getRealSubscriptionPrice($amount = 1, $attributes = 'Array', $country_id = null) #
getVat() #
hasAttributePrice() #
getAttributePrice($attribute_value_id, $before_sale = '') #
getAttributeSalePrice($attribute_value_id) #
getAttributeSubscriptionPrice($attribute_value_id, $country_id = null) #
getShippingInclVat() #
getShipping() #
getApproxShipping() #
getDeliveryTime() #
getDeliveryTimeNotInStock() #
getSave() #
getPercentSave() #
getImages() #
getImage($attribute_value_id = null) #
$attribute_value_id kan være både id eller value (fx 'L')
getProfile() #
getAttributeValue($i) #
getAttributeValueIdBySku($sku) #
getAttributeTag($i) #
getAttributeValueByName($i) #
getCategory() #
getCategoryName() #
getOnlineSince() #
getOnlineHours() #
getCategoryNames($pre = '', $sep = ' ', $post = '') #
getCategories($as_ids = '') #
getStockCount() #
getPackage() #
getIsInStock() #
getInStock($attributes = 'Array', $x = null) #
getNegativeStockCount() #
Returnerer antal på restlager
getAmount() #
getUnitPrice() #
getUnitVat() #
getComment() #
getAttributes() #
getRelatedProducts($limit = 25) #
getSimilarProducts($limit = 25) #
getSimilarProductRatings() #
getSimilarProductReviews() #
getNext() #
getPrev() #
getSupplier() #
getSupplierName() #
getBrandName() #
getSearch() #
getAlsoBought($limit = 25) #
getHtmlFields() #
getHtmlField($tag) #
getInStockVariants() #
getStockVariants($only_in_stock = '', $hide_stock = '') #
getFileDownloadUrl($order_id = null) #
getFile() #
getPDF() #
getPdfFiles() #
getSubscriptionFixation() #
getDiscountIntervals() #
getPurchasePrice($attribute_id = null, $attribute_value_id = null) #
getDiscountIntervalPrice($amount, $attribute_value_id = 0) #
getDiscountIntervalPriceExVat($amount, $attribute_value_id = 0) #
getShippingWeight() #
hasBundleProducts() #
getBundleProductsCount() #
getBundleProducts() #
getLocationByOwnId($own_id) #
getBundleProductIds() #
getMainCategoryName() #
getMainCategory() #
hasCategory($category_id) #
getProductReviews($limit = 25) #
getAvgRating($no_round = '') #
getSafeProduct() #
getBrand() #
getMetaTitle() #
getMetaDescription() #
getOpenGraphTitle() #
getOpenGraphDescription() #
getOpenGraphImage() #
getPrimarySearchPhrase() #
getGoogleShoppingTitle() #
getGoogleCategory() #
getNoIndex() #
hasCampaigns() #
getCampaignInfo() #
getProductLabels() #
getGoogleShoppingImage() #
getBlogPosts() #
getExtensionValue($name) #

SafeProductFile #

getFilename() #
getUrl() #
getMB() #
getBytes() #

SafeProductLabel #

getProductLabelId() #
getName() #
getTag() #

SafeProductProfileAttributeValue #

getAttributeValueId() #
getVal() #
getTag() #
getImages($product) #
Returnerer evt. billeder på varianten. Tager det nuværende produkt som argument.
getImage($product) #
Returnerer evt. billede på varianten. Er der flere, returneres det første. Tager det nuværende produkt som argument.

SafeProductReview #

getRating() #
getDescription() #
getCreated() #
getName() #
getEmail() #
getOrder() #
getProduct() #

SafeProfile #

getAttributeList() #
getName() #
getTag() #
getProfileId() #

SafeProfileAttribute #

getValues() #
getHasPrice() #
getPurpose() #
getTags() #
Tags fra værdierne
getTag() #
getIsVariant() #
getDataType() #
getName() #
getVal() #
getAttributeId() #
getList($profile_id) #

SafeRecurringOrder #

getDeliver() #
getInterval() #
getFirst() #
getNext() #
getShipping() #
getComments() #
getRecurringOrderId() #
getInvoiceId() #
getTime() #
getEmail() #
getPhone() #
getSetting($n) #
getWebshopRecurringOrderId() #
getTrackingNumber() #
getTrackingUrl() #
getPublicUrl($action = 'subscription') #
getStatus() #
getOrderPrice() #
getPrice() #
getTotalPrice() #
getShippingPrice() #
getVat() #
getEanNumber() #
getPaymentPrice() #
getOrderName() #
getOrderCompanyName() #
getOrderAddress() #
getOrderZipcode() #
getOrderCity() #
getOrderCountry() #
getDelName() #
getDelCompanyName() #
getDelAddress() #
getDelCity() #
getDelZipcode() #
getDelCountry() #
getPickupAddress() #
getOrderProducts() #
getProducts() #
getExtras($field = null) #
getVoucher() #
getVoucherDiscount() #
getVoucherCode() #
setTrackingCalled($i = 1) #
getTrackingCalled() #
getPaymentGateway() #
getPaymentGatewayId() #
getCustomer() #
getSubscriptionId() #
getCloseAfter() #

SafeRecurringOrderProduct #

getAmount() #
getUnitPrice($amount = 1) #
getPrice($amount = 1) #
getRealPrice($amount = 1) #
getName() #
getComment() #
getOwnId() #
getAttributes() #

SafeShipping #

getShippingId() #
getName() #
getModule() #
getCost($country_id = null, $basket_total = null) #
getImage() #
getHtmlFields() #
getHtmlField($tag) #
getDeliveryShops($as_json = '') #
getTrackingUrl($id = '') #

SafeSupplier #

getSupplierId() #
getName() #
getRemoteUrl() #

SafeVoucher #

canUse() #
getVoucherId() #
getCode() #
getAllowOnSale() #
getIsPublic() #
getPercentDiscount() #
getPriceDiscount() #
getFreeShipping() #
getOnlyOver() #

SafeWebshop #

getName() #
getWebshopId() #
getCheapestShipping() #
getGaId() #
getEnableTracking() #
getEnableNewTracking() #
getGoogleAdsConversionId() #
getGoogleAdsConversionLabelOrder() #
getFbId() #
getGoogleMerchantId() #
getGoogleMerchantDeliveryDays() #
getGoogleOptimizeId() #
getGoogleTagManagerId() #
getGA4MeasurementID() #
getGooglePlaceID() #
getPinterestTagID() #
getPinterestAccessToken() #
getSnapPixelID() #
getSnapApiToken() #
getTikTokPixelID() #
getTikTokAccessToken() #
getGoogleAdsConversionActionId() #
getLinkedInID() #
getMerchantNumber() #
getStatus() #
getHideDelivery() #
getThemeSetting($element, $name) #
getUrl($action = 'view', $controller = null) #
getAllCategories() #
getCategories() #
getPages() #
getBrands() #
getShippings() #
getCountries() #
getVouchers() #
getPublicVouchers() #
getPaymentModule() #
getLandingPageByTag($tag) #
getLandingPagesByTags($tags) #
getLandingPages() #
getCategoryByTag($tag) #
getPagesByTag($tag) #
getCategoriesByTags($tags = null) #
getCategoryByTags($tags = null) #
getCategory($category_id) #
getLandingPage($landing_page_id) #
getAttributeValues($categori_ids = 'Array') #
getAttributeValuesByTags() #
getCurrency() #
getAlsoBought($products) #
getRelated($products) #
getAfterPurchase($products) #
getPopularProducts($limit = 25, $days = 90, $exclude = null) #
getLiveSince() #
getCreated() #
getRelayUrl($page = '') #
getPaymentGateways() #
getSuppliers() #
getProfiles() #
getMenu($tag) #
getMenuByLocation($location) #
getMenus() #
getRootMenus() #
getHtmlFields() #
getHtmlField($tag) #
getCustomerFields() #
getAllowBasketPayment() #
getOnlineProducts($fields_str = '') #
getProductById($product_id) #
getProductBySku($sku) #
getProductByGtin($gtin) #
getUseEvents() #
Til Klaviyo
getFinancialProducts() #
Returnerer de produkter hvor profilen er "finansiel". Dvs. rabatkoder og kreditter
getThemeSettings() #
getBlogPosts($limit = 25, $offset = 0, $count = null) #
getBlogTitle() #
getBlogDescription() #
getBlogOpenGraphTitle() #
getBlogOpenGraphDescription() #
getStylesheet() #
getSkipApprove() #
getFrontCategory() #
hasInvoiceAddressSelection() #
hasPayPalCheckout() #
getPayPalSecret($basket_id) #
getPayPalClientId() #
getAfterBasket() #
getActiveCampaigns() #
getKlaviyoPublicKey() #
getCompany() #
paidOrders($email) #
getProductLabels() #
getBlocks($type, $id = null) #
templateExists($filename) #
hasLoyaltyProgram() #
getLoyaltyProgramBasePoints() #
getLoyaltyProgramApprovalPeriod() #
getLoyaltyProgramSignupPoints() #
getLoyaltyProgramBaseCost() #
bool useReturnCenter() #
float getReturnShippingPrice($country_id = null) #
float getReturnShippingVat($shipping_price, $country_id = null) #
bool getReturnShippingVatFree() #
getReturnShipping() #
getLoyaltyProgramMinDiscount() #
getLoyaltyProgramMinPoints() #
getLoyaltyProgramMaxDiscount() #
getLoyaltyProgramBaseExpires() #
getTerms() #
getFavicon() #
bool getUseCalculatedUnitPrice() #

SafeWishlist #

int getWishlistId() #
string getName() #
string getDescription() #
string getRemoteUrl() #
array getWishlistProducts() #
string getCreated() #
string getStatus() #
string getEditUrl() #
int getProductCount() #

SafeWishlistProduct #

SafeProduct getProduct() #
int getWishlistProductId() #
getAmount() #
getComments() #
getAttributeValueId() #
getAttributeId() #
getVariantName() #
getVariantValue() #

Copyright 2024 Shoporama

This website uses cookies.

We use cookies to personalize content and ads, provide social media features, and analyze our web traffic.

Information about your use of our website is also shared with our partners within social media, advertising, and analysis, who may combine them with other data from your interactions with their services.

Read more about our cookies